From: email b. <ema...@ya...> - 2005-05-23 20:30:24
|
Update (but still looking for help!): > ======= > > 1) I am wondering if it is possible to statically link to mcrypt libraries > when compiling and linking my own code? I get these errors when I do: > > gcc -I/usr/local/include -c xx.c > gcc -o xx xx.o -L/usr/local/lib -lmcrypt -static > > /usr/bin/ld: cannot find -lmcrypt > collect2: ld returned 1 exit status > make: *** [filtercmd] Error 1 I guess I am showing what a newbie I am. I think I have to remove -lmcrypt and do this instead: gcc -o xx xx.o -L/usr/local/lib -static /usr/local/lib/libmcrypt.so This seems to link OK, but when I try to run the resultant application, I get this: /usr/lib/libc.so.1: bad ELF interpreter: No such file or directory Yikes! I will go back to Google, but I have no idea what this means... why is libc.so now creating problems? What does that have to do with libmcrypt? All this is on Fedora Core 2, BTW. > ======= > > 2) When compiling normally (non-static), things are OK until I run my > binary > and get: > > error while loading shared libraries: libmcrypt.so.4: cannot open shared > object file: No such file or directory > > I read this thread: > > http://lists.hellug.gr/pipermail/mcrypt-dev/2002/000693.html > > But I don't understand what this response means, and I have no other > reason > to think libmcrypt is mis-installed or other... I use libmcrypt every day > in > PHP - no errors, so I think the library is installed ok? I compiled and > installed libmcrypt 2.5.7 from source. > > Hmmm: > > ldconfig -v | grep mcrypt gives me nothing though. well where does PHP > find > it then? how do I get libmcrypt into the loader's cache? The libmcrypt README would have been a good place to start. Apparently, I'd have to recompile libmcrypt to use dynamic loading to get this to work? Since I wanted static linking in the first place, I will leave this one alone unless I can't get the problem above worked out... I'd deeply appreciate it if anyone can help! __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
From: email b. <ema...@ya...> - 2005-05-23 20:39:00
|
--- email builder <ema...@ya...> wrote: > Update (but still looking for help!): > > > ======= > > > > 1) I am wondering if it is possible to statically link to mcrypt > libraries > > when compiling and linking my own code? I get these errors when I do: > > > > gcc -I/usr/local/include -c xx.c > > gcc -o xx xx.o -L/usr/local/lib -lmcrypt -static > > > > /usr/bin/ld: cannot find -lmcrypt > > collect2: ld returned 1 exit status > > make: *** [filtercmd] Error 1 > > I guess I am showing what a newbie I am. I think I have to remove -lmcrypt > and do this instead: > > gcc -o xx xx.o -L/usr/local/lib -static /usr/local/lib/libmcrypt.so Sorry, that's actually supposed to be gcc -o xx xx.o -static /usr/local/lib/libmcrypt.so > This seems to link OK, but when I try to run the resultant application, I > get > this: > > /usr/lib/libc.so.1: bad ELF interpreter: No such file or directory > > Yikes! I will go back to Google, but I have no idea what this means... why > is libc.so now creating problems? What does that have to do with > libmcrypt? > > All this is on Fedora Core 2, BTW. > __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new Resources site http://smallbusiness.yahoo.com/resources/ |
From: Tod T. <tt...@ch...> - 2005-05-24 11:47:57
|
email builder wrote: > --- email builder <ema...@ya...> wrote: > >>Update (but still looking for help!): >> >> >>>======= >>> >>> 1) I am wondering if it is possible to statically link to mcrypt >> >>libraries >> >>>when compiling and linking my own code? I get these errors when I do: >>> >>>gcc -I/usr/local/include -c xx.c >>>gcc -o xx xx.o -L/usr/local/lib -lmcrypt -static >>> >>>/usr/bin/ld: cannot find -lmcrypt >>>collect2: ld returned 1 exit status >>>make: *** [filtercmd] Error 1 >> >> >>I guess I am showing what a newbie I am. I think I have to remove -lmcrypt >>and do this instead: >> >>gcc -o xx xx.o -L/usr/local/lib -static /usr/local/lib/libmcrypt.so > > > > Sorry, that's actually supposed to be > gcc -o xx xx.o -static /usr/local/lib/libmcrypt.so > > > >>This seems to link OK, but when I try to run the resultant application, I >>get >>this: >> >>/usr/lib/libc.so.1: bad ELF interpreter: No such file or directory >> >>Yikes! I will go back to Google, but I have no idea what this means... why >>is libc.so now creating problems? What does that have to do with >>libmcrypt? >> >>All this is on Fedora Core 2, BTW. Try running ldd against the compiled executable and post the results. |
From: email b. <ema...@ya...> - 2005-05-26 15:08:37
|
http://www.linuxquestions.org/questions/showthread.php?s=&postid=1657387#post1657387 --- Tod Thomas <tt...@ch...> wrote: > email builder wrote: > > --- email builder <ema...@ya...> wrote: > > > >>Update (but still looking for help!): > >> > >> > >>>======= > >>> > >>> 1) I am wondering if it is possible to statically link to mcrypt > >> > >>libraries > >> > >>>when compiling and linking my own code? I get these errors when I do: > >>> > >>>gcc -I/usr/local/include -c xx.c > >>>gcc -o xx xx.o -L/usr/local/lib -lmcrypt -static > >>> > >>>/usr/bin/ld: cannot find -lmcrypt > >>>collect2: ld returned 1 exit status > >>>make: *** [filtercmd] Error 1 > >> > >> > >>I guess I am showing what a newbie I am. I think I have to remove > -lmcrypt > >>and do this instead: > >> > >>gcc -o xx xx.o -L/usr/local/lib -static /usr/local/lib/libmcrypt.so > > > > > > > > Sorry, that's actually supposed to be > > gcc -o xx xx.o -static /usr/local/lib/libmcrypt.so > > > > > > > >>This seems to link OK, but when I try to run the resultant application, I > >>get > >>this: > >> > >>/usr/lib/libc.so.1: bad ELF interpreter: No such file or directory > >> > >>Yikes! I will go back to Google, but I have no idea what this means... > why > >>is libc.so now creating problems? What does that have to do with > >>libmcrypt? > >> > >>All this is on Fedora Core 2, BTW. > > Try running ldd against the compiled executable and post the results. > > > ------------------------------------------------------- > This SF.Net email is sponsored by Oracle Space Sweepstakes > Want to be the first software developer in space? > Enter now for the Oracle Space Sweepstakes! > http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click > _______________________________________________ > Mcrypt-developers mailing list > Mcr...@li... > https://lists.sourceforge.net/lists/listinfo/mcrypt-developers > __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new Resources site http://smallbusiness.yahoo.com/resources/ |