[Neurodebian-devel] any ideas why linking against gslcblas "doesn't work" on Ubuntus?
Yaroslav Halchenko
debian at onerussian.com
Wed Sep 11 15:46:38 UTC 2013
ah -- sorry, I should have followed up I guess.
Yes -- it is due to --as-needed although it should have not affected it
there since gslcblas was linked after as well... so who knows...
meanwhile I decided to not give up on --as-needed entirely and the fix
was to add "-Wl,--no-as-needed" right before the -lgsl ... which
usually was nearly the last among libraries to link.
similar dance was needed for Motif libraries, because libXm needs to be linked
before libXt (and possibly other X libraries). With --as-needed linking of Xm
is deferred to the later point where any of its symbols are needed, and usually
that is after referencing any X symbols, thus it gets linked AFTER Xt leading
to incorrect operation. So here is what I needed to do
-Wl,--no-as-needed ${MOTIF_LIBRARIES} -Wl,--as-needed
;) thus enabling --as-needed even for Debian builds (where there is no
--as-needed by default) for all subsequently listed libraries... oh well -- it
should be only for the benefit, right? ;)
Cheers,
On Wed, 11 Sep 2013, Yury V. Zaytsev wrote:
> On Tue, 2013-09-03 at 08:59 -0400, Yaroslav Halchenko wrote:
> > Need input since can't figure it out myself... I am on a quest to
> > robustify our AFNI's builds. Everything is working smooth on Debians
> > but all Ubuntus fail while linking against gsl/gslcblas -- it is like
> > if there were no -lgslcblas
> Hi Yarik,
> Just a shot in the dark: it could be due to --as-needed enabled on
> Ubuntus by default. In order to disable it for the session try
> export LDFLAGS="-Wl,--no-as-needed"
> Hope that helps and let me know if this worked,
--
Yaroslav O. Halchenko, Ph.D.
http://neuro.debian.net http://www.pymvpa.org http://www.fail2ban.org
Senior Research Associate, Psychological and Brain Sciences Dept.
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834 Fax: +1 (603) 646-1419
WWW: http://www.linkedin.com/in/yarik
More information about the Neurodebian-devel
mailing list