Opened 3 years ago
Last modified 2 years ago
#64787 assigned defect
shared-mime-info fails to build for ppc64 on Leopard: need to add muniversal PortGroup — at Version 5
Reported by: | barracuda156 | Owned by: | RJVB (René Bertin) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.7.2 |
Keywords: | powerpc, leopard, ppc64 | Cc: | |
Port: | shared-mime-info |
Description (last modified by barracuda156)
Earlier problem:
---> Building shared-mime-info Executing: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_shared-mime-info/shared-mime-info/work/build" && /opt/local/bin/ninja -j4 -v [1/8] /usr/bin/gcc-4.2 -Isrc/test-subclassing.p -Isrc -I../shared-mime-info-2.1/src -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/libxml2 -I/opt/local/include -Wall -Winvalid-pch -g -pipe -Os -arch ppc64 -MD -MQ src/test-subclassing.p/test-subclassing.c.o -MF src/test-subclassing.p/test-subclassing.c.o.d -o src/test-subclassing.p/test-subclassing.c.o -c ../shared-mime-info-2.1/src/test-subclassing.c [2/8] /usr/bin/gcc-4.2 -o src/test-subclassing src/test-subclassing.p/test-subclassing.c.o -L/opt/local/lib -I/opt/local/include -Wl,-dead_strip_dylibs -Wl,-headerpad_max_install_names -Wl,-undefined,error -Wl,-headerpad_max_install_names -arch ppc64 -pipe -Os -arch ppc64 -L/opt/local/lib -lglib-2.0 -lintl /opt/local/lib/libxml2.a FAILED: src/test-subclassing /usr/bin/gcc-4.2 -o src/test-subclassing src/test-subclassing.p/test-subclassing.c.o -L/opt/local/lib -I/opt/local/include -Wl,-dead_strip_dylibs -Wl,-headerpad_max_install_names -Wl,-undefined,error -Wl,-headerpad_max_install_names -arch ppc64 -pipe -Os -arch ppc64 -L/opt/local/lib -lglib-2.0 -lintl /opt/local/lib/libxml2.a Undefined symbols: "_deflate", referenced from: _xmlIOHTTPCloseWrite in libxml2.a(xmlIO.o) _xmlIOHTTPWrite in libxml2.a(xmlIO.o) "_deflateEnd", referenced from: _xmlFreeZMemBuff in libxml2.a(xmlIO.o) "_gzclose", referenced from: _xmlGzfileClose in libxml2.a(xmlIO.o) "_ucnv_setToUCallBack_67", referenced from: _openIcuConverter in libxml2.a(encoding.o) "_crc32", referenced from: _xmlIOHTTPWrite in libxml2.a(xmlIO.o) _xmlIOHTTPOpenW in libxml2.a(xmlIO.o) _xz_decomp in libxml2.a(xzlib.o) _xz_decomp in libxml2.a(xzlib.o) _xz_make in libxml2.a(xzlib.o) "_UCNV_TO_U_CALLBACK_STOP_67", referenced from: _UCNV_TO_U_CALLBACK_STOP_67$non_lazy_ptr in libxml2.a(encoding.o) "_gzwrite", referenced from: _xmlGzfileWrite in libxml2.a(xmlIO.o) "_ucnv_convertEx_67", referenced from: _xmlUconvWrapper in libxml2.a(encoding.o) "_gzdopen", referenced from: _xmlGzfileOpenW in libxml2.a(xmlIO.o) _xmlGzfileOpen_real in libxml2.a(xmlIO.o) "_ucnv_close_67", referenced from: _closeIcuConverter in libxml2.a(encoding.o) _closeIcuConverter in libxml2.a(encoding.o) _openIcuConverter in libxml2.a(encoding.o) "_inflateEnd", referenced from: _xmlNanoHTTPFreeCtxt in libxml2.a(nanohttp.o) ___libxml2_xzclose in libxml2.a(xzlib.o) "_inflate", referenced from: _xmlNanoHTTPRead in libxml2.a(nanohttp.o) _xz_decomp in libxml2.a(xzlib.o) "_deflateInit2_", referenced from: _xmlIOHTTPOpenW in libxml2.a(xmlIO.o) "_inflateReset", referenced from: _xz_make in libxml2.a(xzlib.o) "_lzma_end", referenced from: ___libxml2_xzclose in libxml2.a(xzlib.o) "_lzma_properties_decode", referenced from: _xz_make in libxml2.a(xzlib.o) "_libiconv_close", referenced from: _xmlCharEncCloseFunc in libxml2.a(encoding.o) _xmlCharEncCloseFunc in libxml2.a(encoding.o) _xmlFindCharEncodingHandler in libxml2.a(encoding.o) _xmlFindCharEncodingHandler in libxml2.a(encoding.o) "_gzdirect", referenced from: ___xmlParserInputBufferCreateFilename in libxml2.a(xmlIO.o) "_inflateInit2_", referenced from: _xmlNanoHTTPMethodRedir in libxml2.a(nanohttp.o) _xz_make in libxml2.a(xzlib.o) "_libiconv", referenced from: _xmlIconvWrapper in libxml2.a(encoding.o) "_ucnv_setFromUCallBack_67", referenced from: _openIcuConverter in libxml2.a(encoding.o) "_UCNV_FROM_U_CALLBACK_STOP_67", referenced from: _UCNV_FROM_U_CALLBACK_STOP_67$non_lazy_ptr in libxml2.a(encoding.o) "_libiconv_open", referenced from: _xmlFindCharEncodingHandler in libxml2.a(encoding.o) _xmlFindCharEncodingHandler in libxml2.a(encoding.o) _xmlFindCharEncodingHandler in libxml2.a(encoding.o) _xmlFindCharEncodingHandler in libxml2.a(encoding.o) "_lzma_auto_decoder", referenced from: _xz_make in libxml2.a(xzlib.o) "_ucnv_open_67", referenced from: _openIcuConverter in libxml2.a(encoding.o) _openIcuConverter in libxml2.a(encoding.o) "_gzopen", referenced from: _xmlGzfileOpenW in libxml2.a(xmlIO.o) _xmlGzfileOpen_real in libxml2.a(xmlIO.o) "_gzread", referenced from: _xmlGzfileRead in libxml2.a(xmlIO.o) "_lzma_code", referenced from: _xz_decomp in libxml2.a(xzlib.o) ld: symbol(s) not found collect2: ld returned 1 exit status [3/8] /usr/bin/gcc-4.2 -Isrc/update-mime-database.p -Isrc -I../shared-mime-info-2.1/src -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/libxml2 -I/opt/local/include -Wall -Winvalid-pch -g -pipe -Os -arch ppc64 -MD -MQ src/update-mime-database.p/update-mime-database.c.o -MF src/update-mime-database.p/update-mime-database.c.o.d -o src/update-mime-database.p/update-mime-database.c.o -c ../shared-mime-info-2.1/src/update-mime-database.c In file included from /opt/local/include/glib-2.0/glib/gthread.h:34, from /opt/local/include/glib-2.0/glib/gasyncqueue.h:32, from /opt/local/include/glib-2.0/glib.h:32, from ../shared-mime-info-2.1/src/update-mime-database.c:11: /opt/local/include/glib-2.0/glib/gutils.h:336: warning: ‘GVoidFunc’ is deprecated In file included from /opt/local/include/glib-2.0/glib.h:32, from ../shared-mime-info-2.1/src/update-mime-database.c:11: /opt/local/include/glib-2.0/glib/gasyncqueue.h:116: warning: ‘GTimeVal’ is deprecated /opt/local/include/glib-2.0/glib/gasyncqueue.h:119: warning: ‘GTimeVal’ is deprecated In file included from /opt/local/include/glib-2.0/glib.h:43, from ../shared-mime-info-2.1/src/update-mime-database.c:11: /opt/local/include/glib-2.0/glib/gdate.h:201: warning: ‘GTimeVal’ is deprecated /opt/local/include/glib-2.0/glib/gdate.h:204: warning: ‘GTime’ is deprecated In file included from /opt/local/include/glib-2.0/glib.h:44, from ../shared-mime-info-2.1/src/update-mime-database.c:11: /opt/local/include/glib-2.0/glib/gdatetime.h:118: warning: ‘GTimeVal’ is deprecated /opt/local/include/glib-2.0/glib/gdatetime.h:120: warning: ‘GTimeVal’ is deprecated /opt/local/include/glib-2.0/glib/gdatetime.h:246: warning: ‘GTimeVal’ is deprecated In file included from /opt/local/include/glib-2.0/glib/giochannel.h:33, from /opt/local/include/glib-2.0/glib.h:54, from ../shared-mime-info-2.1/src/update-mime-database.c:11: /opt/local/include/glib-2.0/glib/gmain.h:654: warning: ‘GTimeVal’ is deprecated /opt/local/include/glib-2.0/glib/gmain.h:679: warning: ‘GTimeVal’ is deprecated In file included from /opt/local/include/glib-2.0/glib.h:85, from ../shared-mime-info-2.1/src/update-mime-database.c:11: /opt/local/include/glib-2.0/glib/gtestutils.h:379: warning: ‘GTestTrapFlags’ is deprecated In file included from /opt/local/include/glib-2.0/glib.h:88, from ../shared-mime-info-2.1/src/update-mime-database.c:11: /opt/local/include/glib-2.0/glib/gtimer.h:67: warning: ‘GTimeVal’ is deprecated /opt/local/include/glib-2.0/glib/gtimer.h:71: warning: ‘GTimeVal’ is deprecated /opt/local/include/glib-2.0/glib/gtimer.h:73: warning: ‘GTimeVal’ is deprecated In file included from /opt/local/include/glib-2.0/glib.h:90, from ../shared-mime-info-2.1/src/update-mime-database.c:11: /opt/local/include/glib-2.0/glib/gtrashstack.h:41: warning: ‘GTrashStack’ is deprecated /opt/local/include/glib-2.0/glib/gtrashstack.h:45: warning: ‘GTrashStack’ is deprecated /opt/local/include/glib-2.0/glib/gtrashstack.h:48: warning: ‘GTrashStack’ is deprecated /opt/local/include/glib-2.0/glib/gtrashstack.h:50: warning: ‘GTrashStack’ is deprecated /opt/local/include/glib-2.0/glib/gtrashstack.h:52: warning: ‘GTrashStack’ is deprecated In file included from /opt/local/include/glib-2.0/glib.h:107, from ../shared-mime-info-2.1/src/update-mime-database.c:11: /opt/local/include/glib-2.0/glib/deprecated/gcache.h:47: warning: ‘GCacheNewFunc’ is deprecated /opt/local/include/glib-2.0/glib/deprecated/gcache.h:48: warning: ‘GCacheDestroyFunc’ is deprecated /opt/local/include/glib-2.0/glib/deprecated/gcache.h:49: warning: ‘GCacheDupFunc’ is deprecated /opt/local/include/glib-2.0/glib/deprecated/gcache.h:50: warning: ‘GCacheDestroyFunc’ is deprecated /opt/local/include/glib-2.0/glib/deprecated/gcache.h:55: warning: ‘GCache’ is deprecated /opt/local/include/glib-2.0/glib/deprecated/gcache.h:57: warning: ‘GCache’ is deprecated /opt/local/include/glib-2.0/glib/deprecated/gcache.h:60: warning: ‘GCache’ is deprecated /opt/local/include/glib-2.0/glib/deprecated/gcache.h:63: warning: ‘GCache’ is deprecated /opt/local/include/glib-2.0/glib/deprecated/gcache.h:67: warning: ‘GCache’ is deprecated In file included from /opt/local/include/glib-2.0/glib.h:111, from ../shared-mime-info-2.1/src/update-mime-database.c:11: /opt/local/include/glib-2.0/glib/deprecated/gthread.h:52: warning: ‘GThreadPriority’ is deprecated /opt/local/include/glib-2.0/glib/deprecated/gthread.h:70: warning: ‘GTimeVal’ is deprecated /opt/local/include/glib-2.0/glib/deprecated/gthread.h:81: warning: ‘GThreadPriority’ is deprecated /opt/local/include/glib-2.0/glib/deprecated/gthread.h:88: warning: ‘GThreadPriority’ is deprecated /opt/local/include/glib-2.0/glib/deprecated/gthread.h:94: warning: ‘GThreadFunctions’ is deprecated /opt/local/include/glib-2.0/glib/deprecated/gthread.h:111: warning: ‘GThreadPriority’ is deprecated /opt/local/include/glib-2.0/glib/deprecated/gthread.h:116: warning: ‘GThreadPriority’ is deprecated In file included from /opt/local/include/glib-2.0/glib.h:111, from ../shared-mime-info-2.1/src/update-mime-database.c:11: /opt/local/include/glib-2.0/glib/deprecated/gthread.h:146: warning: ‘GStaticMutex’ is deprecated /opt/local/include/glib-2.0/glib/deprecated/gthread.h:148: warning: ‘GStaticMutex’ is deprecated /opt/local/include/glib-2.0/glib/deprecated/gthread.h:150: warning: ‘GStaticMutex’ is deprecated /opt/local/include/glib-2.0/glib/deprecated/gthread.h:156: warning: ‘GStaticMutex’ is deprecated /opt/local/include/glib-2.0/glib/deprecated/gthread.h:172: warning: ‘GStaticRecMutex’ is deprecated /opt/local/include/glib-2.0/glib/deprecated/gthread.h:175: warning: ‘GStaticRecMutex’ is deprecated /opt/local/include/glib-2.0/glib/deprecated/gthread.h:178: warning: ‘GStaticRecMutex’ is deprecated /opt/local/include/glib-2.0/glib/deprecated/gthread.h:181: warning: ‘GStaticRecMutex’ is deprecated /opt/local/include/glib-2.0/glib/deprecated/gthread.h:184: warning: ‘GStaticRecMutex’ is deprecated /opt/local/include/glib-2.0/glib/deprecated/gthread.h:188: warning: ‘GStaticRecMutex’ is deprecated /opt/local/include/glib-2.0/glib/deprecated/gthread.h:191: warning: ‘GStaticRecMutex’ is deprecated /opt/local/include/glib-2.0/glib/deprecated/gthread.h:197: warning: ‘GStaticMutex’ is deprecated /opt/local/include/glib-2.0/glib/deprecated/gthread.h:209: warning: ‘GStaticRWLock’ is deprecated /opt/local/include/glib-2.0/glib/deprecated/gthread.h:212: warning: ‘GStaticRWLock’ is deprecated /opt/local/include/glib-2.0/glib/deprecated/gthread.h:215: warning: ‘GStaticRWLock’ is deprecated /opt/local/include/glib-2.0/glib/deprecated/gthread.h:218: warning: ‘GStaticRWLock’ is deprecated /opt/local/include/glib-2.0/glib/deprecated/gthread.h:221: warning: ‘GStaticRWLock’ is deprecated /opt/local/include/glib-2.0/glib/deprecated/gthread.h:224: warning: ‘GStaticRWLock’ is deprecated /opt/local/include/glib-2.0/glib/deprecated/gthread.h:227: warning: ‘GStaticRWLock’ is deprecated /opt/local/include/glib-2.0/glib/deprecated/gthread.h:230: warning: ‘GStaticRWLock’ is deprecated /opt/local/include/glib-2.0/glib/deprecated/gthread.h:244: warning: ‘GStaticPrivate’ is deprecated /opt/local/include/glib-2.0/glib/deprecated/gthread.h:247: warning: ‘GStaticPrivate’ is deprecated /opt/local/include/glib-2.0/glib/deprecated/gthread.h:250: warning: ‘GStaticPrivate’ is deprecated /opt/local/include/glib-2.0/glib/deprecated/gthread.h:255: warning: ‘GStaticPrivate’ is deprecated /opt/local/include/glib-2.0/glib/deprecated/gthread.h:283: warning: ‘GTimeVal’ is deprecated [4/8] /opt/local/bin/xmlto -o data/shared-mime-info-spec-html html-nochunks ../shared-mime-info-2.1/data/shared-mime-info-spec.xml [5/8] /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_shared-mime-info/shared-mime-info/work/shared-mime-info-2.1/data/freedesktop_generate.sh /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_shared-mime-info/shared-mime-info/work/shared-mime-info-2.1 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_shared-mime-info/shared-mime-info/work/build ninja: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_shared-mime-info/shared-mime-info/work/build' [0/1] Running external command shared-mime-info-gmo (wrapped by meson to set env) ninja: build stopped: subcommand failed. Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_shared-mime-info/shared-mime-info/work/build" && /opt/local/bin/ninja -j4 -v Exit code: 1 Error: Failed to build shared-mime-info: command execution failed
Just in case, glib2
is built for ppc64
:
36-72:~ svacchanda$ port -v installed glib2 The following ports are currently installed: glib2 @2.62.6_2+x11 requested_variants='-universal' platform='darwin 9' archs='ppc' date='2021-12-22T12:28:22+0800' glib2 @2.64.6_0+x11 requested_variants='' platform='darwin 9' archs='ppc' date='2021-12-29T16:07:42+0800' glib2 @2.64.6_1+x11 (active) requested_variants='-universal' platform='darwin 9' archs='ppc64' date='2022-03-08T06:30:55+0800'
As well as libxml2
:
36-72:~ svacchanda$ port -v installed libxml2 The following ports are currently installed: libxml2 @2.9.12_1 requested_variants='-universal' platform='darwin 9' archs='ppc' date='2021-12-22T12:25:12+0800' libxml2 @2.9.12_1+universal requested_variants='+universal' platform='darwin 9' archs='ppc ppc64' date='2021-12-22T08:28:30+0800' libxml2 @2.9.13_0 requested_variants='-universal' platform='darwin 9' archs='ppc' date='2022-03-03T04:18:59+0800' libxml2 @2.9.13_0+universal (active) requested_variants='+universal' platform='darwin 9' archs='ppc ppc64' date='2022-03-08T06:06:56+0800'
UPDATE AFTER FIXING MESON: shared-mime-info
still fails as +universal
:
Build type: native build Project name: shared-mime-info Project version: 2.2 meson.build:2:0: ERROR: Unable to detect linker for compiler "/usr/bin/gcc-4.2 -Wl,--version -pipe -Os -arch ppc -arch ppc64 -I/opt/local/include" stdout: stderr: A full log can be found at /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_shared-mime-info/shared-mime-info/work/build/meson-logs/meson-log.txt Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_shared-mime-info/shared-mime-info/work/shared-mime-info-2.2" && /opt/local/bin/meson --prefix=/opt/local /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_shared-mime-info/shared-mime-info/work/shared-mime-info-2.2 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_shared-mime-info/shared-mime-info/work/build Exit code: 1 Error: Failed to configure shared-mime-info: consult /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_shared-mime-info/shared-mime-info/work/build/meson-logs/meson-log.txt Error: Failed to configure shared-mime-info: configure failure: command execution failed Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_shared-mime-info/shared-mime-info/main.log for details. Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug. Error: Processing of port shared-mime-info failed
However once muniversal 1.0
is added, it builds successfully:
36-109:svacchanda$ port -v installed shared-mime-info The following ports are currently installed: shared-mime-info @2.1_0 requested_variants='-universal' platform='darwin 9' archs='ppc' date='2022-02-19T01:40:21+0800' shared-mime-info @2.2_0+universal (active) requested_variants='+universal' platform='darwin 9' archs='ppc ppc64' date='2022-04-06T07:05:16+0800'
Change History (7)
Changed 3 years ago by barracuda156
Changed 3 years ago by barracuda156
Attachment: | meson-log.txt added |
---|
comment:1 follow-up: 2 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
comment:2 Changed 3 years ago by barracuda156
Replying to ryandesign:
It is unusual that it is trying to link with the static library libxml2.a. It should be linking with the dynamic library libxml2.dylib. Once that is fixed, the undefined symbols should disappear.
The meson log says the reason is:
Rejected /opt/local/lib/libxml2.dylib, supports ['ppc7400', 'ppc64'] but need ppcIt is "normal" for software to build for ppc7400 (G4) when
-arch ppc
is used on a system version that does not support G3 processors. Maybe meson is not aware of that and needs to be enhanced to deal with it.
Could you suggest what should I try to do?
- S. Notice a similar error with
gobject-introspection
that usesmeson
now: https://trac.macports.org/ticket/64769
comment:3 follow-up: 4 Changed 3 years ago by kencu (Ken)
read through the meson source code. It’s written in python, so easy enough. Find some part where it is examing the architecture of dependent libraries. Fix it to not error with the ppc7400 issue. Possibly submit the fix upstream.
Or, just open an issue with meson and see if they will fix it for you. Don’t hold your breath there, but….
Or, ask Evan to fix it. He only has a G3 though, so doesn’t see this error and can’t test it….
comment:4 Changed 3 years ago by barracuda156
Replying to kencu:
read through the meson source code. It’s written in python, so easy enough. Find some part where it is examing the architecture of dependent libraries. Fix it to not error with the ppc7400 issue. Possibly submit the fix upstream.
I have fixed meson
:
--- mesonbuild/mesonlib/universal.py.orig 2022-03-15 17:29:03.000000000 +0800 +++ mesonbuild/mesonlib/universal.py 2022-04-06 06:59:05.000000000 +0800 @@ -710,6 +710,8 @@ # Convert from lipo-style archs to meson-style CPUs stdo = stdo.replace('i386', 'x86') stdo = stdo.replace('arm64', 'aarch64') + stdo = stdo.replace('ppc7400', 'ppc') + stdo = stdo.replace('ppc970', 'ppc64') # Add generic name for armv7 and armv7s if 'armv7' in stdo: stdo += ' arm'
- S. Added
ppc970
just in case, may be redundant.
comment:5 Changed 3 years ago by barracuda156
Description: | modified (diff) |
---|---|
Owner: | set to RJVB |
Status: | new → assigned |
Summary: | shared-mime-info fails to build for ppc64 on Leopard → shared-mime-info fails to build for ppc64 on Leopard: need to add muniversal PortGroup |
Version: | 2.7.1 → 2.7.2 |
It is unusual that it is trying to link with the static library libxml2.a. It should be linking with the dynamic library libxml2.dylib. Once that is fixed, the undefined symbols should disappear.
The meson log says the reason is:
It is "normal" for software to build for ppc7400 (G4) when
-arch ppc
is used on a system version that does not support G3 processors. Maybe meson is not aware of that and needs to be enhanced to deal with it.