nmlorg / naim

naim is a console client for AOL Instant Messenger (AIM), AOL I Seek You (ICQ), Internet Relay Chat (IRC), and The lily CMC.
http://naim.n.ml.org/
1 stars 0 forks source link

Cannot build naim statically (for embedded platforms) #31

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
> What steps will reproduce the problem?

1. Run "CFLAGS=-static ./configure --enable-static" against the latest source.
2. Do a make or make install.
3. Resulting naim binary is "dynamic linked", not static.  This is clearly
visible in the terminal output in the very last gcc which builds the binary.

> What is the expected output? What do you see instead?
When running 'file naim', expect a static binary.  See this instead ...

./src/naim: ELF 32-bit LSB executable, ARM, version 1 (ARM), dynamically
linked (uses shared libs), not stripped

> What version of naim are you using? On what operating system?
> % naim --version

Latest stable source.

> % uname -a
(using scratchbox) Linux zipitdev 2.6.26-2-686 #1 SMP Wed Aug 19 06:06:52
UTC 2009 arm GNU/Linux

> Please provide any additional information below.

Attaching relevant stuff!  Also - usually when this happens, you can copy
and paste the last gcc line into a terminal and add -static to the end of
it.  I cannot do that with naim because it kills off required libs
immediately after it's done with them.  If you can change this so that it
leaves stuff alone, I can complete this build.  :-)

Original issue reported on code.google.com by rayha...@gmail.com on 6 Nov 2009 at 7:44

Attachments:

GoogleCodeExporter commented 9 years ago
Not dismissing the problem, but why do you need a fully static executable? This 
means
even things like libc will be copied into your executable, which can make it 
huge
(which is typically an even bigger problem than usual for embedded systems). 
Are you
just trying to embed a certain library (like libncurses)?

Original comment by nml...@gmail.com on 6 Nov 2009 at 8:11

GoogleCodeExporter commented 9 years ago
Well, I understand how that might seem silly.  It is!  But here is what I am 
doing 
...

I am compiling binaries that can be dropped onto an SD card, and used on a 
Zipit Z2 
(a little handheld messenger device with some neat characteristics).  While 
this 
device is capable of running a full fledged OS, I am trying to do as much as I 
can by 
using the stock kernel that the device ships with.  One HUGE limitation of 
this, is 
that all of your binaries must be built static.  This kernel does not support 
sensible static bins.

So, yes, the binaries can be a couple meg in size.  But that is okay.  I built 
nmap 
this way with ncurses crammed into it.  It doesn't run great, but it runs!  :-)

Original comment by rayha...@gmail.com on 6 Nov 2009 at 10:01