EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Problem with static build on Linux
From: Andrew Johnson <[email protected]>
To: Mark Rivers <[email protected]>
Cc: [email protected]
Date: Fri, 01 Aug 2003 11:30:56 -0500
Mark Rivers wrote:

This has now been reproduced on 3 separate Redhat 8 machines. Andrew Johnson built on a Redhat 9 machine, and the resulting static binary worked when run under both Redhat 9 and Redhat 8. It would be great if some other folks could try this on Redhat 8 and 9 and see if it is actually a version problem. Any ideas why it does not work on Redhat 8 would be most welcome.

Mark,


I'm now convinced this is a glibc problem - I rebuilt base on RH 8.0, and confirmed that I can reporduce your problem with a static build of the example application. Then I rebuilt the example app on my RH 9.0 machine but using the 8.0 build of base (this way around works, the reverse doesn't). The only difference between the code in the result is the OS libraries, which on RH 9.0 means glibc 2.3.2 vs 2.2.93. This binary runs quite happily on both OS versions.

I also managed to manually build a working executable on RH8.0 that statically linked to the libraries from base but dynamically to the system libraries. The command line I used was this:

/usr/bin/g++ -o example -L/home/phoebus/ANJ/epics/base/3-14-dev/lib/linux-x86/ -L/home/phoebus3/ANJ/apps/example-3.14/lib/linux-x86/ example_registerRecordDeviceDriver.o dbSubExample.o exampleMain.o -Wl,-Bstatic -lxxxSupport -lrecIoc -lsoftDevIoc -ltestDevIoc -liocsh -lmiscIoc -lrsrvIoc -ldbtoolsIoc -lasIoc -ldbIoc -lregistryIoc -ldbStaticIoc -lca -lCom -Wl,-Bdynamic -lpthread -lreadline -lncurses -lm -lrt

Note the strategically placed -Wl,Bstatic and -Wl,-Bdynamic arguments.

I've filed a bug report to request the ability to build mixed-mode binaries using this linker feature, but I don't know whether Janet would be able to implement it in time for R3.14.3, probably not...

- Andrew
--
There are 10 types of people in the world:
Those who understand binary, and those who don't.


Replies:
RE: Problem with static build on Linux John Quintana
References:
RE: Problem with static build on Linux Mark Rivers

Navigate by Date:
Prev: Re: Problem with static build on Linux D. Peter Siddons
Next: RE: Problem with static build on Linux John Quintana
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Problem with static build on Linux Mark Rivers
Next: RE: Problem with static build on Linux John Quintana
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·