Results 1 to 7 of 7
Hi,
I am developing an embedded device using arm platform and there I want to install a mad player in the target. for that I want to copile it in ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 09-17-2011 #1Just Joined!
- Join Date
- Aug 2011
- Posts
- 11
configure with static libs
Hi,
I am developing an embedded device using arm platform and there I want to install a mad player in the target. for that I want to copile it in my host with static libraries. I already tried using
--enable-static --disable-shared
options in the configuration command. Although the command generates static libs, the executable program still requires shared libs when I try command "arm-linux-readelf -d /location/madplay "
what should I do in order to build the program completely static ?
thank you.
- 09-17-2011 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 10,236
Building the package's components to generate static libraries is one thing. Linking is another. Find the line in the Makefile(s) that create/link the executables and make sure you have added the -static and -static-libgcc options. You might be able to specify these linker options to the configure script (safer), but if not, then edit the appropriate Makefiles as indicated above.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 09-17-2011 #3Just Joined!
- Join Date
- Aug 2011
- Posts
- 11
Hi,
thanks for your answer. But still I have the same problem. After running config script, as you said I manually changed every Makefile as follow
CC = /usr/local/arm_linux_4.2/bin/arm-linux-gcc -static -static-libgcc
CPP = /usr/local/arm_linux_4.2/bin/arm-linux-gcc -static -static-libgcc -E
and then ran make and make install commands. But still the executable program needs shared libs. what should I do?
thank you.
- 09-18-2011 #4Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 10,236
Is there any Makefile variable LD defined something like this?
LD = /usr/local/arm_linux_4.2/bin/arm-linux-ld
If so, then add the -static -static-libgcc options to that.Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 09-18-2011 #5Just Joined!
- Join Date
- Aug 2011
- Posts
- 11
Hi Rubberman,
I checked Makefiles but none of them contains a variable named LD or related to ld command. So I manually added
LD = /usr/local/arm_linux_4.2/bin/arm-linux-ld -static -static-libgcc
But the output had not changed.
thank you.
- 09-18-2011 #6Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 10,236
The thing with the LD variable was just if they were using that instead of CC to build the executables. You can us the compiler to build executables, in which case the compiler will call the linker with the appropriate options, or you can use the linker directly. Some applications do it one way, and some do it the other way.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 09-19-2011 #7Just Joined!
- Join Date
- Aug 2011
- Posts
- 11
Hi,
thanks for your reply.But I am still struggling with the same problem. what are the next possible options?
thank you.


Reply With Quote
