Opened 3 years ago
Last modified 16 months ago
#64486 reopened defect
bison-runtime fails at destroot on 10.5.8 ppc64 and 10.6.8 Rosetta – solution found
Reported by: | barracuda156 | Owned by: | mascguy (Christopher Nielsen) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.7.1 |
Keywords: | powerpc | Cc: | |
Port: | bison |
Description
Executing: cd "/opt/powerpc/var/macports/build/_opt_powerpc_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_bison/bison-runtime/work/bison-3.8.2/runtime-po" && /usr/bin/make -w install DESTDIR=/opt/powerpc/var/macports/build/_opt_powerpc_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_bison/bison-runtime/work/destroot make: Entering directory `/opt/powerpc/var/macports/build/_opt_powerpc_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_bison/bison-runtime/work/bison-3.8.2/runtime-po' if test "bison" = "gettext-tools"; then \ .././build-aux/install-sh -c -d /opt/powerpc/var/macports/build/_opt_powerpc_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_bison/bison-runtime/work/destroot/opt/powerpc/share/gettext/po; \ for file in Makefile.in.in remove-potcdate.sin quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot Makevars.template; do \ /usr/bin/install -c -m 644 ./$file \ /opt/powerpc/var/macports/build/_opt_powerpc_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_bison/bison-runtime/work/destroot/opt/powerpc/share/gettext/po/$file; \ done; \ for file in Makevars; do \ rm -f /opt/powerpc/var/macports/build/_opt_powerpc_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_bison/bison-runtime/work/destroot/opt/powerpc/share/gettext/po/$file; \ done; \ else \ : ; \ fi make: Leaving directory `/opt/powerpc/var/macports/build/_opt_powerpc_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_bison/bison-runtime/work/bison-3.8.2/runtime-po' Error: No files have been installed in the destroot directory! Error: Please make sure that this software supports 'make install DESTDIR=${destroot}' or implement an alternative destroot mechanism in the Portfile.
Attachments (2)
Change History (22)
Changed 3 years ago by barracuda156
comment:1 Changed 3 years ago by barracuda156
Keywords: | powerpc added |
---|---|
Port: | bison-runtime added; powerpc removed |
comment:2 follow-up: 3 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
Owner: | set to mascguy |
---|---|
Port: | bison added; bison-runtime removed |
Status: | new → assigned |
comment:3 Changed 3 years ago by barracuda156
Replying to ryandesign:
The only thing the bison-runtime port installs is compiled gettext message catalogs. On your system, it's finding the gettext utility programs (from the gettext ports) but it's failing to find the iconv or gettext libraries (from the libiconv and gettext-runtime ports):
Both installed, yes:
Sergey-Fedorovs-Mac-mini:bin svacchanda$ ./port -v installed libiconv The following ports are currently installed: libiconv @1.16_1 (active) requested_variants='' platform='darwin 10' archs='ppc' date='2022-01-21T21:13:42+0800' Sergey-Fedorovs-Mac-mini:bin svacchanda$ ./port -v installed gettext-runtime The following ports are currently installed: gettext-runtime @0.21_0 (active) requested_variants='' platform='darwin 10' archs='ppc' date='2022-01-21T21:15:02+0800'
Changed 3 years ago by barracuda156
Attachment: | config.log added |
---|
comment:4 follow-ups: 5 6 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
The log tells us the problem is:
ld: warning: in /opt/powerpc/lib/libintl.dylib, file was built for ppc7400 which is not the architecture being linked (x86_64)
I don't see any -arch
flags being used in bison's configure tests, so that will need to be fixed for non-default-arch builds to work.
comment:5 Changed 3 years ago by barracuda156
Replying to ryandesign:
The log tells us the problem is:
ld: warning: in /opt/powerpc/lib/libintl.dylib, file was built for ppc7400 which is not the architecture being linked (x86_64)I don't see any
-arch
flags being used in bison's configure tests, so that will need to be fixed for non-default-arch builds to work.
Thanks, I will try to fix that.
By the way, I re-installed ppc Macports into default prefix, and the error is slightly different (but same place):
configure:55636: result: no configure:55670: checking for iconv configure:55731: result: no, consider installing GNU libiconv configure:56410: checking for GNU gettext in libintl configure:56443: /usr/bin/gcc-4.2 -std=gnu99 -o conftest -pipe -Os -I/opt/local/include -L/opt/local/lib -Wl,-headerpad_max_install_names conftest.c -lintl >&5 collect2: ld terminated with signal 6 [Abort trap] configure:56443: $? = 1 configure: failed program was: | /* confdefs.h */
comment:6 Changed 3 years ago by barracuda156
Replying to ryandesign:
The log tells us the problem is:
Done!
Sergey-Fedorovs-Mac-mini:~ svacchanda$ port -v installed | grep "bison" bison @3.8.2_2 (active) requested_variants='' platform='darwin 10' archs='ppc' date='2022-01-24T05:27:39+0800' bison-runtime @3.8.2_0 (active) requested_variants='' platform='darwin 10' archs='noarch' date='2022-01-24T05:26:52+0800'
This addition to port file solved the problem:
configure.args-append CC="gcc-4.2 -arch ppc" \ CXX="g++-4.2 -arch ppc" \ CFLAGS="-arch ppc" \ CXXLAGS="-arch ppc" \ LDFLAGS="-L/opt/local/lib" \ --build=powerpc-apple-darwin10 \ --host=powerpc-apple-darwin10 \ --with-libiconv-prefix=/opt/local \ --with-libintl-prefix=/opt/local
comment:7 Changed 3 years ago by barracuda156
Summary: | bison-runtime build for ppc fails at destroot on 10.6.8 (Rosetta) → bison-runtime build for ppc fails at destroot on 10.6.8 (Rosetta) – solution found |
---|
comment:8 follow-up: 9 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
Obviously we would need a more general solution to be able to apply it to MacPorts.
comment:9 follow-up: 12 Changed 3 years ago by barracuda156
Replying to ryandesign:
Obviously we would need a more general solution to be able to apply it to MacPorts.
Can this be added to port file with condition specified, like:
if {${os.major} == 10 && ${configure.build_arch} eq "ppc"} { configure.args-append CC="gcc-4.2 -arch ppc" \ CXX="g++-4.2 -arch ppc" \ CFLAGS="-arch ppc" \ CXXLAGS="-arch ppc" \ LDFLAGS="-L/opt/local/lib" \ --build=powerpc-apple-darwin10 \ --host=powerpc-apple-darwin10 \ --with-libiconv-prefix=/opt/local \ --with-libintl-prefix=/opt/local }
comment:10 Changed 3 years ago by barracuda156
UPD. The same problem happens on 10.5.8 when building for ppc64, and it gets solved likewise (replacing powerpc-apple-darwin10 with powerpc64-apple-darwin9).
comment:11 Changed 3 years ago by barracuda156
Summary: | bison-runtime build for ppc fails at destroot on 10.6.8 (Rosetta) – solution found → bison-runtime fails at destroot on 10.5.8 ppc64 and 10.6.8 Rosetta – solution found |
---|
comment:12 follow-up: 15 Changed 3 years ago by mascguy (Christopher Nielsen)
Replying to barracuda156:
Can this be added to port file with condition specified, like:
[...]
I'm fine with that, albeit generalized for the target architecture:
if {${os.major} == 10 && ${configure.build_arch} in [list ppc ppc64]} { configure.args-append CC="gcc-4.2 -arch ${configure.build_arch}" \ CXX="g++-4.2 -arch ${configure.build_arch}" \ CFLAGS="-arch ${configure.build_arch}" \ CXXLAGS="-arch ${configure.build_arch}" \ LDFLAGS="-L/opt/local/lib" \ --build=powerpc-apple-darwin${os.major} \ --host=powerpc-apple-darwin${os.major} \ --with-libiconv-prefix=/opt/local \ --with-libintl-prefix=/opt/local }
Ryan/Ken, how does this look to you folks? And are there any other gotchas I need to be aware of...?
comment:13 follow-up: 14 Changed 3 years ago by kencu (Ken)
it looks fragile, although might work for now…it would be nice to see a more robust solution, Makefile Portgroup, fix the flags properly, etc…
but nobody might get around to a proper fix, so…
comment:14 follow-up: 16 Changed 3 years ago by mascguy (Christopher Nielsen)
Replying to kencu:
it looks fragile, although might work for now…it would be nice to see a more robust solution, Makefile Portgroup, fix the flags properly, etc…
but nobody might get around to a proper fix, so…
Agreed, it's definitely not the most elegant solution. Nor is it something I plan to keep around long-term, if there's a better way to clean it up.
But on a positive note: Since I'm now the maintainer of this port, folks have someone to yell at if something like this breaks! :-D
I'll give Ryan a chance to chime in as well though, before making the change.
comment:15 Changed 3 years ago by barracuda156
Replying to mascguy:
Replying to barracuda156:
Can this be added to port file with condition specified, like:
[...]
I'm fine with that, albeit generalized for the target architecture:
if {${os.major} == 10 && ${configure.build_arch} in [list ppc ppc64]} { configure.args-append CC="gcc-4.2 -arch ${configure.build_arch}" \ CXX="g++-4.2 -arch ${configure.build_arch}" \ CFLAGS="-arch ${configure.build_arch}" \ CXXLAGS="-arch ${configure.build_arch}" \ LDFLAGS="-L/opt/local/lib" \ --build=powerpc-apple-darwin${os.major} \ --host=powerpc-apple-darwin${os.major} \ --with-libiconv-prefix=/opt/local \ --with-libintl-prefix=/opt/local }Ryan/Ken, how does this look to you folks? And are there any other gotchas I need to be aware of...?
I am not sure ppc64 for darwin10 is sensible (neither 10.6.8 nor 10A190 currently supports it), though perhaps it does not hurt either: if we ever succeed in fixing ppc64 for 10.6 PPC, it will be useful.
comment:16 follow-up: 17 Changed 2 years ago by barracuda156
Replying to mascguy:
Replying to kencu:
it looks fragile, although might work for now…it would be nice to see a more robust solution, Makefile Portgroup, fix the flags properly, etc…
but nobody might get around to a proper fix, so…
Agreed, it's definitely not the most elegant solution. Nor is it something I plan to keep around long-term, if there's a better way to clean it up.
But on a positive note: Since I'm now the maintainer of this port, folks have someone to yell at if something like this breaks! :-D
I'll give Ryan a chance to chime in as well though, before making the change.
Just reminding to add the change to the portfile.
comment:17 follow-up: 18 Changed 2 years ago by mascguy (Christopher Nielsen)
Replying to barracuda156:
Just reminding to add the change to the portfile.
Thanks, still pondering what the best approach might be: I'm reluctant to add anything fragile, so it's still on the back burner.
Implementation thoughts welcome all!
comment:18 Changed 2 years ago by barracuda156
Replying to mascguy:
Implementation thoughts welcome all!
This works:
platform darwin 10 { if {${build_arch} eq "ppc"} { configure.args-append \ --build=powerpc-apple-darwin${os.major} \ CC="${configure.cc} -arch ppc" } }
comment:19 Changed 2 years ago by barracuda156
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:20 Changed 16 months ago by kencu (Ken)
Resolution: | fixed |
---|---|
Status: | closed → reopened |
This fix is not robust, and is too specific to 10.6
The same issue happens on other systems, such as the parallel of darwin9 building for ppc on an Intel system, which I am doing right now.
In fact, the issue will likely crop up any time the requested build does not match the output of config.guess.
A more robust fix might be to add the build parameter to all builds, or at least all builds where the requested build does not match config.guess. Have to think about how that would exactly work with this port, that can build universal but without using the muniversal portgroup.
The only thing the bison-runtime port installs is compiled gettext message catalogs. On your system, it's finding the gettext utility programs (from the gettext ports) but it's failing to find the iconv or gettext libraries (from the libiconv and gettext-runtime ports):
You should already have the libiconv and gettext-runtime ports installed since they are dependencies of the gettext port that we've already established you do have installed.
The port is missing a dependency on gettext, though since you already have it installed that won't be why this failed.
Please attach the config.log so we can check why it failed.