Results 1 to 2 of 2
Thread: cross_compile and static linking
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Oct 2010
cross_compile and static linking
I have cross_compiled a few different things for Android over the last year. Now I'm trying to do the same with samba, but this gives me some problems. The configure part ignores everything I tell it to do.
I have a arm cross compiler installed that is set in the CC variable. But when i tell ./configure to use --prefix, --enable-static, --host and --disable-shared it makes no difference. The binaries that comes out of 'make' is not statically linked, they are not cross_compiled for arm and the installation dir is still set to /usr/local/samba although I changed it.
How do I compile samba for Android?
And I know there are a samba android package, but that is not what i am looking for. I don't want the app, just the binaries.
- Join Date
- Jan 2011
- Fairfax, Virginia, USA
Hi, have you seen this link?
Samba/Compiling Samba from Source - Wikibooks, open books for an open world
Here is an except from the link:
After you have downloaded the Samba sources from Samba.org, unpack these sources and enter the samba-<version>/source/ directory. Then you need to set the CC environment: # export LD_LIBRARY_PATH=/<path_to_compiler>/lib # export LDFLAGS=-L/<path_to_compiler>/lib # export CPPFLAGS=-I/<path_to_compiler>/include # export CC=<path_to_compiler>/bin/<your_compiler> [...] clipped [...] # ./configure --host=i686 --target=mips-linux-uclibc
I've never cross compiled SAMBA, but I have run into issues like you are describing ... try following the above instructions, set the LDFLAGS to include "-static" and experiment with "-static-libgcc" also.