Opened 13 years ago
Closed 13 years ago
#211 closed defect (fixed)
Compiling with --as-needed linker flag fails
Reported by: | Frank Siegert | Owned by: | Frank Siegert |
---|---|---|---|
Priority: | major | Milestone: | rel-1.4.0 |
Component: | Unknown | Version: | 1.3.1 |
Keywords: | Cc: |
Description
With recent versions of e.g. Ubuntu the --as-needed
linker option became default, which breaks the build system in previous Sherpa versions (<= 1.3.1). The workaround is the attached patch which has to be applied as follows:
cd SHERPA-MC-1.3.1 patch -p0 < no-as-needed.patch autoreconf -fi ./configure [... your options ...] make install
Attachments (1)
Change History (5)
Changed 13 years ago by
Attachment: | no-as-needed.patch added |
---|
comment:1 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 Changed 13 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:3 Changed 13 years ago by
Unfortunately, due to a bug in libtool, it's not enough to simply set the flags correctly. libtool reorders them in such a way, that --no-as-needed becomes disabled: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=347650
We would need a patched ltmain.sh to work around this, but that was voted against in favour of the CXX modification above. Is there no workaround to ignore the CXX modification if on MacOS?
comment:4 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
OK, I extended the configure-hack in order to handle the MacOS case. It's not pretty, but it works.
This patch breaks the build system on MacOS. Do we really need to reset the CXX, or is it sufficient to define AM_LDFLAGS in acinclude.m4?