r10071 (compatibility patch to compile using gcc 4.6) fails to build on OS X 10.5.8 (GCC 4.2.1)
On 27/2/11 21:51, noreply@...1881... wrote:
Merge authors: theAdib (theadib)
revno: 10071 [merge] fixes bug(s): https://launchpad.net/bugs/707205 committer: theAdib <theadib@...400...> branch nick: myproject timestamp: Sun 2011-02-27 21:49:32 +0100 message: compatibility patch to compile using gcc 4.6 modified:
<snip>
=== modified file 'src/Makefile.am' --- src/Makefile.am 2010-10-12 20:06:35 +0000 +++ src/Makefile.am 2011-02-27 16:24:40 +0000 @@ -212,7 +212,7 @@
inkscape_SOURCES += main.cpp $(win32_sources) inkscape_LDADD = $(all_libs) -inkscape_LDFLAGS = --export-dynamic $(kdeldflags) $(mwindows) +inkscape_LDFLAGS = -Wl,--export-dynamic $(kdeldflags) $(mwindows)
inkview_SOURCES += inkview.cpp $(win32_sources) inkview_LDADD = $(all_libs)
Inkscape 048+devel r10071 fails to build on OS X 10.5.8 (i386):
CXX inkscape-version.o AR libinkversion.a CXX main.o CXXLD inkscape ld: unknown option: --export-dynamic collect2: ld returned 1 exit status make[3]: *** [inkscape] Error 1 make[2]: *** [all] Error 2 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2
LeWitt:~ suv$ g++-4.2 --version i686-apple-darwin9-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5577) LeWitt:~ suv$ which ld /usr/bin/ld LeWitt:~ suv$ ld -v @(#)PROGRAM:ld PROJECT:ld64-85.2.1
~suv
On 27/2/11 23:20, ~suv wrote:
On 27/2/11 21:51, noreply@...1881... wrote:
Merge authors: theAdib (theadib)
revno: 10071 [merge]
=== modified file 'src/Makefile.am' --- src/Makefile.am 2010-10-12 20:06:35 +0000 +++ src/Makefile.am 2011-02-27 16:24:40 +0000 @@ -212,7 +212,7 @@
inkscape_SOURCES += main.cpp $(win32_sources) inkscape_LDADD = $(all_libs) -inkscape_LDFLAGS = --export-dynamic $(kdeldflags) $(mwindows) +inkscape_LDFLAGS = -Wl,--export-dynamic $(kdeldflags) $(mwindows)
inkview_SOURCES += inkview.cpp $(win32_sources) inkview_LDADD = $(all_libs)
Inkscape 048+devel r10071 fails to build on OS X 10.5.8 (i386):
CXX inkscape-version.o AR libinkversion.a CXX main.o CXXLD inkscape ld: unknown option: --export-dynamic collect2: ld returned 1 exit status make[3]: *** [inkscape] Error 1 make[2]: *** [all] Error 2 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2
"CXXLD inkscape" expanded:
echo " CXXLD " inkscape;/bin/sh ../libtool --silent --tag=CXX --mode=link g++-4.2 -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch -Wno-unused-parameter -g -O3 -Wall -Wl,--export-dynamic -L/Volumes/blue/mp-inkscape/with-a-long-long-long-directory-name/lib -o inkscape main.o libinkscape.a dom/libdom.a libcroco/libcroco.a libavoid/libavoid.a libgdl/libgdl.a libcola/libcola.a libvpsc/libvpsc.a livarot/libvarot.a 2geom/lib2geom.a libinkversion.a -L/Volumes/blue/mp-inkscape/with-a-long-long-long-directory-name/lib -lgtkmm-2.4 -latkmm-1.6 -lgdkmm-2.4 -lgiomm-2.4 -lpangomm-1.4 -lglibmm-2.4 -lcairomm-1.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lpangoft2-1.0 -lgio-2.0 -lXext -lXfixes -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lxslt -lxml2 -lpthread -lcairo -lpixman-1 -lfontconfig -lexpat -lfreetype -lXrender -lX11 -lXau -lXdmcp -lsigc-2.0 -lgthread-2.0 -lglib-2.0
-lintl -liconv -lpng12 -lz -lgsl -lgslcblas -lm -lpng -lz -lX11 -lxml2 -ldl -lpopt -laspell -L/Volumes/blue/mp-inkscape/with-a-long-long-long-directory-name/lib -lgnomevfs-2 -lgconf-2 -lORBit-2 -lm -ldbus-1 -lpthread -lgmodule-2.0 -lgobject-2.0 -lgthread-2.0 -lglib-2.0 -lintl -liconv -L/Volumes/blue/mp-inkscape/with-a-long-long-long-directory-name/lib -lfontconfig -lexpat -lfreetype -lz -liconv -L/Volumes/blue/mp-inkscape/with-a-long-long-long-directory-name/lib -lpangoft2-1.0 -lpango-1.0 -lm -lfontconfig -lexpat -lfreetype -lz -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -lintl -liconv -L/Volumes/blue/mp-inkscape/with-a-long-long-long-directory-name/lib -lfreetype -lz -framework Carbon -L/Volumes/blue/mp-inkscape/with-a-long-long-long-directory-name/lib -lwpg-0.1 -lwpg-stream-0.1 -lwpd-0.8 -L/Volumes/blue/mp-inkscape/with-a-long-long-long-directory-name/lib -lMagick++ -lMagickCore -lgc -L/Volumes/blue/mp-inkscape/with-a-long-long-long-directory-n ame/lib -llcms -L/Volumes/blue/mp-inkscape/with-a-long-long-long-directory-name/lib -lpoppler -L/Volumes/blue/mp-inkscape/with-a-long-long-long-directory-name/lib -lpoppler-glib -lpoppler -lgdk-x11-2.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lpangoft2-1.0 -lpango-1.0 -lm -lgio-2.0 -lXext -lXfixes -lcairo -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -lintl -lpixman-1 -lfontconfig -lexpat -lfreetype -liconv -lpng12 -lz -lXrender -lX11 -lXau -lXdmcp
Installed libtool version:
libtool @2.2.6b, Revision 1
from autogenerated 'libtool':
# The linker used to build libraries. LD="/usr/libexec/gcc/i686-apple-darwin9/4.2.1/ld"
# A language specific compiler. CC="g++-4.2"
used versions:
LeWitt:~ suv$ /usr/libexec/gcc/i686-apple-darwin9/4.2.1/ld -v @(#)PROGRAM:ld PROJECT:ld64-85.2.1 LeWitt:~ suv$ which g++-4.2 /usr/bin/g++-4.2 LeWitt:~ suv$ /usr/bin/g++-4.2 --version i686-apple-darwin9-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5577) Copyright (C) 2007 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
LeWitt:~ suv$ port info libtool libtool @2.2.6b, Revision 1 (devel, sysutils)
Currently testing & rebuilding with libtool 2.4 (and GCC 4.2.1).
~suv
On 28/2/11 12:00, ~suv wrote:
On 27/2/11 23:20, ~suv wrote:
On 27/2/11 21:51, noreply@...1881... wrote:
Merge authors: theAdib (theadib)
revno: 10071 [merge]
=== modified file 'src/Makefile.am' --- src/Makefile.am 2010-10-12 20:06:35 +0000 +++ src/Makefile.am 2011-02-27 16:24:40 +0000 @@ -212,7 +212,7 @@
inkscape_SOURCES += main.cpp $(win32_sources) inkscape_LDADD = $(all_libs) -inkscape_LDFLAGS = --export-dynamic $(kdeldflags) $(mwindows) +inkscape_LDFLAGS = -Wl,--export-dynamic $(kdeldflags) $(mwindows)
inkview_SOURCES += inkview.cpp $(win32_sources) inkview_LDADD = $(all_libs)
Currently testing & rebuilding with libtool 2.4 (and GCC 4.2.1).
same error (libtool 2.4, ld from GCC 4.2.1):
0.48+devel r10074 custom CXX inkscape-version.o AR libinkversion.a CXX main.o CXXLD inkscape ld: unknown option: --export-dynamic collect2: ld returned 1 exit status make[3]: *** [inkscape] Error 1 make[2]: *** [all] Error 2 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2
real 41m11.414s user 30m35.377s sys 5m13.956s LeWitt:inkscape-trunk suv$
Seems that linker flags needs to be platform-dependent (or tests added in configure.ac?)
~suv
Hello suv,
what if you just revert the changes from Makefile.am (removing the -Wl option) ?
Regards, Adib.
On Mon, Feb 28, 2011 at 12:36 PM, ~suv <suv-sf@...58...> wrote:
On 28/2/11 12:00, ~suv wrote:
On 27/2/11 23:20, ~suv wrote:
On 27/2/11 21:51, noreply@...1881... wrote:
Merge authors: theAdib (theadib)
revno: 10071 [merge]
=== modified file 'src/Makefile.am' --- src/Makefile.am 2010-10-12 20:06:35 +0000 +++ src/Makefile.am 2011-02-27 16:24:40 +0000 @@ -212,7 +212,7 @@
inkscape_SOURCES += main.cpp $(win32_sources) inkscape_LDADD = $(all_libs) -inkscape_LDFLAGS = --export-dynamic $(kdeldflags) $(mwindows) +inkscape_LDFLAGS = -Wl,--export-dynamic $(kdeldflags) $(mwindows)
inkview_SOURCES += inkview.cpp $(win32_sources) inkview_LDADD = $(all_libs)
Currently testing & rebuilding with libtool 2.4 (and GCC 4.2.1).
same error (libtool 2.4, ld from GCC 4.2.1):
0.48+devel r10074 custom CXX inkscape-version.o AR libinkversion.a CXX main.o CXXLD inkscape ld: unknown option: --export-dynamic collect2: ld returned 1 exit status make[3]: *** [inkscape] Error 1 make[2]: *** [all] Error 2 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2
real 41m11.414s user 30m35.377s sys 5m13.956s LeWitt:inkscape-trunk suv$
Seems that linker flags needs to be platform-dependent (or tests added in configure.ac?)
~suv
On 28/2/11 21:40, the Adib wrote:
what if you just revert the changes from Makefile.am (removing the -Wl option) ?
Yes, it picks up where it failed earlier, links and finishes without further errors after
$ bzr revert -r 10070 src/Makefile.am $ make
<snip>
$ src/inkscape --version Xlib: extension "RANDR" missing on display "/tmp/launch-wiwyAr/:0". Inkscape 0.48+devel r10074 custom (Feb 28 2011)
which is expected because linking worked before r10071, and it's a known 'unknown option' of GCC's ld on Mac OS X (according to Google).
It's just that reverting is no solution IMHO - the option for 'ld' either needs to be tested first (in configure.ac are already similar tests IIRC), or added in 'src/Makefile.am' depending on the platform.
I have never built and installed a newer GCC version (via MacPorts), so I cannot test nor confirm if upping the requirements of the build environment to a more recent GCC version (not provided by Apple) would make it possible to use the linker flag '-Wl,--export-dynamic' untested for all platforms.
The official Inkscape release packages are still done on Mac OS X 10.5 Leopard which defaults to GCC 4.0.1 (and includes GCC 4.2.1 as alternative compiler, though they both use the same include files from 4.0.1 - AFAIR from an earlier problem with TR1 hashtable).
~suv
participants (2)
-
the Adib
-
~suv