|
|
| Author |
Message |
|
| garazdawi |
Posted: Mon Oct 30, 2006 6:28 pm |
|
|
|
User
Joined: 10 Jul 2006
Posts: 20
|
There seems to be a bug when compiling the Crypto Application. It
compiles fine, but when you try to load it it fails. To fix this I had
to add -fno-stack-protector to the CFLAGS so that the make command
looks like this:
$ gcc -c -o ../priv/obj/i686-pc-linux-gnu/crypto_drv.o -g -O2
-I/home/lukas/Desktop/otp_src_R11B-1/erts/i686-pc-linux-gnu
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
-DUSE_THREADS -D_THREAD_SAFE -D_REENTRANT
-D_POSIX_THREAD_SAFE_FUNCTIONS -fPIC -fno-stack-protector
-I/usr/include -I../../..//erts/emulator/beam
-I../../..//erts/emulator/sys/unix crypto_drv.c
$ ld -shared -L/usr/lib -R/usr/lib \
> -o ../priv/lib/i686-pc-linux-gnu/crypto_drv.so ../priv/obj/i686-pc-linux-gnu/crypto_drv.o -lcrypto
Lukas
_______________________________________________
erlang-questions mailing list
erlang-questions@erlang.org
http://www.erlang.org/mailman/listinfo/erlang-questions
Post recived from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Tue Oct 31, 2006 5:48 am |
|
|
|
Guest
|
Which platform is that?
Given the path -I/home/lukas/Desktop... I guess Mac OS X, but which version is
it?
/Bjorn
"Lukas Larsson" <lukas@erlang-consulting.com> writes:
> There seems to be a bug when compiling the Crypto Application. It
> compiles fine, but when you try to load it it fails. To fix this I had
> to add -fno-stack-protector to the CFLAGS so that the make command
> looks like this:
>
> $ gcc -c -o ../priv/obj/i686-pc-linux-gnu/crypto_drv.o -g -O2
> -I/home/lukas/Desktop/otp_src_R11B-1/erts/i686-pc-linux-gnu
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
> -DUSE_THREADS -D_THREAD_SAFE -D_REENTRANT
> -D_POSIX_THREAD_SAFE_FUNCTIONS -fPIC -fno-stack-protector
> -I/usr/include -I../../..//erts/emulator/beam
> -I../../..//erts/emulator/sys/unix crypto_drv.c
>
> $ ld -shared -L/usr/lib -R/usr/lib \
> > -o ../priv/lib/i686-pc-linux-gnu/crypto_drv.so ../priv/obj/i686-pc-linux-gnu/crypto_drv.o -lcrypto
>
> Lukas
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@erlang.org
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
--
Bj |
|
|
| Back to top |
|
| garazdawi |
Posted: Tue Oct 31, 2006 10:48 am |
|
|
|
User
Joined: 10 Jul 2006
Posts: 20
|
I'm running the Edgy Ubuntu version. I think that it was gcc4 which
caused this error to occur but I'm not sure. I just searched the web
for the same error message that I got when trying to do a
erl_ddll:load_driver on the crypto_drv file and found that adding that
flag would fix the error, which it did.
Lukas
On 31 Oct 2006 06:44:52 +0100, Bjorn Gustavsson <bjorn@erix.ericsson.se> wrote:
> Which platform is that?
>
> Given the path -I/home/lukas/Desktop... I guess Mac OS X, but which version is
> it?
>
> /Bjorn
>
> "Lukas Larsson" <lukas@erlang-consulting.com> writes:
>
> > There seems to be a bug when compiling the Crypto Application. It
> > compiles fine, but when you try to load it it fails. To fix this I had
> > to add -fno-stack-protector to the CFLAGS so that the make command
> > looks like this:
> >
> > $ gcc -c -o ../priv/obj/i686-pc-linux-gnu/crypto_drv.o -g -O2
> > -I/home/lukas/Desktop/otp_src_R11B-1/erts/i686-pc-linux-gnu
> > -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
> > -DUSE_THREADS -D_THREAD_SAFE -D_REENTRANT
> > -D_POSIX_THREAD_SAFE_FUNCTIONS -fPIC -fno-stack-protector
> > -I/usr/include -I../../..//erts/emulator/beam
> > -I../../..//erts/emulator/sys/unix crypto_drv.c
> >
> > $ ld -shared -L/usr/lib -R/usr/lib \
> > > -o ../priv/lib/i686-pc-linux-gnu/crypto_drv.so ../priv/obj/i686-pc-linux-gnu/crypto_drv.o -lcrypto
> >
> > Lukas
> > _______________________________________________
> > erlang-questions mailing list
> > erlang-questions@erlang.org
> > http://www.erlang.org/mailman/listinfo/erlang-questions
> >
>
> --
> Bj |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|
|