#66258 closed defect (worksforme)
icu @72.1 does not build on PPC Tiger, Mac OS X 10.4.11, because of problems with assembly code
Reported by: | ballapete (Peter "Pete" Dyballa) | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.0 |
Keywords: | tiger ppc | Cc: | kirill@… |
Port: | icu |
Description
gnumake[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_icu/icu/work/icu/source/data' /bin/sh ../mkinstalldirs ./out DYLD_LIBRARY_PATH=../lib:../stubdata:../tools/ctestfw:$DYLD_LIBRARY_PATH ../bin/icupkg -tb ./in/icudt72l.dat ./out/icudt72b.dat /bin/sh ../mkinstalldirs ./out/tmp ./out/build/icudt72b mkdir ./out/tmp mkdir ./out/build mkdir ./out/build/icudt72b Unpacking ./out/icudt72b.dat and generating out/tmp/icudata.lst (list of data files) DYLD_LIBRARY_PATH=../lib:../stubdata:../tools/ctestfw:$DYLD_LIBRARY_PATH ../bin/icupkg -d ./out/build/icudt72b --list -x \* ./out/icudt72b.dat -o out/tmp/icudata.lst echo timestamp > build-local DYLD_LIBRARY_PATH=../stubdata:../tools/ctestfw:../lib:$DYLD_LIBRARY_PATH ../bin/pkgdata -O ../data/icupkg.inc -q -c -s /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_icu/icu/work/icu/source/data/out/build/icudt72b -d ../lib -e icudt72 -T ./out/tmp -p icudt72b -L icudata -m static -r 72.1 ./out/tmp/icudata.lst ./out/tmp/icudt72b_dat.S:7:Unknown pseudo-op: .balign ./out/tmp/icudt72b_dat.S:7:Rest of line ignored. 1st junk character valued 49 (1). -- return status = 256 Error creating with assembly code. Failed command: /opt/local/bin/gcc-mp-7 -DU_ATTRIBUTE_DEPRECATED= -DU_HAVE_STRTOD_L=1 -DU_HAVE_XLOCALE_H=1 -pipe -Os -arch ppc -std=c11 -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -fno-common -c -I../common -I../common -dynamic -o ./out/tmp/icudt72b_dat.o ./out/tmp/icudt72b_dat.S Error generating assembly code for data. pkgdata: /opt/local/bin/gcc-mp-7 -DU_ATTRIBUTE_DEPRECATED= -DU_HAVE_STRTOD_L=1 -DU_HAVE_XLOCALE_H=1 -pipe -Os -arch ppc -std=c11 -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -fno-common -c -I../common -I../common -dynamic -o ./out/tmp/icudt72b_dat.o ./out/tmp/icudt72b_dat.S gnumake[1]: *** [packagedata] Error 1
Attachments (3)
Change History (75)
Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
comment:1 follow-up: 10 Changed 2 years ago by catap (Kirill A. Korinsky)
Well, seems that as
is too old to build it. Switching to .align
may introduce some bugs because its behaviour is depend on hardware for GCC. See: https://sourceware.org/binutils/docs/as/Pseudo-Ops.html
I have a crazy idea to use gcc10-bootstrap
as compiler for 10.4. May I ask you to try to build gcc10-bootstrap
port?
comment:2 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
In a few days, after finishing as much updates as possible (by telling MacPorts that there is no icu upgrade
), I could try. The PowerBook can compile in the background and heat my apartment fine…
BTW, I have also nasm @2.15.05
and yasm @1.3.0
installed…
comment:3 follow-up: 8 Changed 2 years ago by catap (Kirill A. Korinsky)
Peter, when you may try a patch like that:
diff --git a/devel/icu/Portfile b/devel/icu/Portfile index 638d1d87fb7..aa2a13bd8f2 100644 --- a/devel/icu/Portfile +++ b/devel/icu/Portfile @@ -84,9 +84,14 @@ if {${subport} eq ${name} || ${subport} eq "${name}-lx"} { configure.cppflags-delete -I${prefix}/include configure.ldflags-delete -L${prefix}/lib + configure.env-append \ + AS=${prefix}/bin/yasm + building.env-append AS=${prefix}/bin/yasm + configure.args --disable-layoutex \ --disable-samples \ - --enable-static + --enable-static \ + AS=${prefix}/bin/yasm configure.universal_args-delete --disable-dependency-tracking
It might work...
comment:4 Changed 2 years ago by kencu (Ken)
"Yasm currently supports the x86 and AMD64 instruction sets"
comment:5 Changed 2 years ago by kencu (Ken)
There are only two options, I believe.
- change ".balign" to ".align"
- use Iains new "llas" PowerPC assembler. This is a big project, as it requires pulling in his llvm-7.1-for-PPC project, which he uses for the back-end for the new "llas" assembler he wrote. And that project, the llvm-7.1-for-PPC project, is not necessarily something we want in MacPorts right now as it is unfinished and raw still. Unfinished raw things just cause 100,000 tickets without resolutions, you may have noticed.
comment:6 Changed 2 years ago by catap (Kirill A. Korinsky)
Ken, but he said that it is installed (and I've assumed that it works! :) )
Peter, a patch to change .balign
to .align
is trivial and you need to change it at the only one place: source/tools/toolutil/pkg_genc.cpp
but I really not sure about side effects that it may introduce. Probably none, but I really not sure.
comment:7 Changed 2 years ago by kencu (Ken)
I guess yasm would probably work on PPC, if it installed, but still, it can only build x86 and AMD64 assembly.
comment:8 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
Replying to catap:
Peter, when you may try a patch like that:
+ building.env-append AS=${prefix}/bin/yasm
}}}
This is illegal, port
says… (Could build.args-append
, build.env-append
, or configure.env
be more approriate?)
Configure
does not check for Assembler. No Makefile
in build directory tree contains the word yasm
.
BTW, shouldn't the word build
on line #23 of Portfile
be built
?
comment:9 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
I think the file in question was compiled. TWICE:
/opt/local/bin/g++-mp-7 -DU_ATTRIBUTE_DEPRECATED= -DU_TOOLUTIL_IMPLEMENTATION -DU_HAVE_STRTOD_L=1 -DU_HAVE_XLOCALE_H=1 -I. -I../../common -I../../i18n "-DU_BUILD=\"powerpc-apple-darwin8.11.0\"" "-DU_HOST=\"powerpc-apple-darwin8.11.0\"" "-DU_CC=\"/opt/local/bin/gcc-mp-7\"" "-DU_CXX=\"/opt/local/bin/g++-mp-7\"" -DUNISTR_FROM_CHAR_EXPLICIT=explicit -DUNISTR_FROM_STRING_EXPLICIT=explicit -pipe -Os -D_GLIBCXX_USE_CXX11_ABI=0 -arch ppc -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long -std=c++11 -fvisibility=hidden -fno-common -c -MMD -MT "pkg_genc.d pkg_genc.o pkg_genc.ao" -o pkg_genc.ao pkg_genc.cpp pkg_genc.cpp: In function 'uint32_t write32(FileStream*, uint32_t, uint32_t)': pkg_genc.cpp:584:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < sizeof(uint32_t); i++) ~~^~~~~~~~~ /opt/local/bin/g++-mp-7 -DU_ATTRIBUTE_DEPRECATED= -DU_TOOLUTIL_IMPLEMENTATION -DU_HAVE_STRTOD_L=1 -DU_HAVE_XLOCALE_H=1 -I. -I../../common -I../../i18n "-DU_BUILD=\"powerpc-apple-darwin8.11.0\"" "-DU_HOST=\"powerpc-apple-darwin8.11.0\"" "-DU_CC=\"/opt/local/bin/gcc-mp-7\"" "-DU_CXX=\"/opt/local/bin/g++-mp-7\"" -DUNISTR_FROM_CHAR_EXPLICIT=explicit -DUNISTR_FROM_STRING_EXPLICIT=explicit -pipe -Os -D_GLIBCXX_USE_CXX11_ABI=0 -arch ppc -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long -std=c++11 -fvisibility=hidden -fno-common -c -MMD -MT "pkg_gencmn.d pkg_gencmn.o pkg_gencmn.ao" -o pkg_gencmn.ao pkg_gencmn.cpp
and then
/opt/local/bin/g++-mp-7 -DU_ATTRIBUTE_DEPRECATED= -DU_TOOLUTIL_IMPLEMENTATION -DU_HAVE_STRTOD_L=1 -DU_HAVE_XLOCALE_H=1 -I. -I../../common -I../../i18n "-DU_BUILD=\"powerpc-apple-darwin8.11.0\"" "-DU_HOST=\"powerpc-apple-darwin8.11.0\"" "-DU_CC=\"/opt/local/bin/gcc-mp-7\"" "-DU_CXX=\"/opt/local/bin/g++-mp-7\"" -DUNISTR_FROM_CHAR_EXPLICIT=explicit -DUNISTR_FROM_STRING_EXPLICIT=explicit -pipe -Os -D_GLIBCXX_USE_CXX11_ABI=0 -arch ppc -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long -std=c++11 -fvisibility=hidden -fno-common -c -dynamic -MMD -MT "pkg_genc.d pkg_genc.o pkg_genc.ao" -o pkg_genc.o pkg_genc.cpp pkg_genc.cpp: In function 'uint32_t write32(FileStream*, uint32_t, uint32_t)': pkg_genc.cpp:584:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < sizeof(uint32_t); i++) ~~^~~~~~~~~ /opt/local/bin/g++-mp-7 -DU_ATTRIBUTE_DEPRECATED= -DU_TOOLUTIL_IMPLEMENTATION -DU_HAVE_STRTOD_L=1 -DU_HAVE_XLOCALE_H=1 -I. -I../../common -I../../i18n "-DU_BUILD=\"powerpc-apple-darwin8.11.0\"" "-DU_HOST=\"powerpc-apple-darwin8.11.0\"" "-DU_CC=\"/opt/local/bin/gcc-mp-7\"" "-DU_CXX=\"/opt/local/bin/g++-mp-7\"" -DUNISTR_FROM_CHAR_EXPLICIT=explicit -DUNISTR_FROM_STRING_EXPLICIT=explicit -pipe -Os -D_GLIBCXX_USE_CXX11_ABI=0 -arch ppc -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long -std=c++11 -fvisibility=hidden -fno-common -c -dynamic -MMD -MT "pkg_gencmn.d pkg_gencmn.o pkg_gencmn.ao" -o pkg_gencmn.o pkg_gencmn.cpp
It's -c -MMD -MT "pkg_genc.d pkg_genc.o pkg_genc.ao" -o pkg_genc.ao pkg_genc.cpp
vs. -c -dynamic -MMD -MT "pkg_genc.d pkg_genc.o pkg_genc.ao" -o pkg_genc.o pkg_genc.cpp
– a fault? Not capable to find a decision for either this or that? First output file is pkg_genc.ao
and second output file is pkg_genc.o
But in the end I see again:
gnumake[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_icu/icu/work/icu/source/data' /bin/sh ../mkinstalldirs ./out DYLD_LIBRARY_PATH=../lib:../stubdata:../tools/ctestfw:$DYLD_LIBRARY_PATH ../bin/icupkg -tb ./in/icudt72l.dat ./out/icudt72b.dat /bin/sh ../mkinstalldirs ./out/tmp ./out/build/icudt72b mkdir ./out/tmp mkdir ./out/build mkdir ./out/build/icudt72b Unpacking ./out/icudt72b.dat and generating out/tmp/icudata.lst (list of data files) DYLD_LIBRARY_PATH=../lib:../stubdata:../tools/ctestfw:$DYLD_LIBRARY_PATH ../bin/icupkg -d ./out/build/icudt72b --list -x \* ./out/icudt72b.dat -o out/tmp/icudata.lst echo timestamp > build-local DYLD_LIBRARY_PATH=../stubdata:../tools/ctestfw:../lib:$DYLD_LIBRARY_PATH ../bin/pkgdata -O ../data/icupkg.inc -q -c -s /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_icu/icu/work/icu/source/data/out/build/icudt72b -d ../lib -e icudt72 -T ./out/tmp -p icudt72b -L icudata -m static -r 72.1 ./out/tmp/icudata.lst ./out/tmp/icudt72b_dat.S:7:Unknown pseudo-op: .balign ./out/tmp/icudt72b_dat.S:7:Rest of line ignored. 1st junk character valued 49 (1). -- return status = 256 Error creating with assembly code. Failed command: /opt/local/bin/gcc-mp-7 -DU_ATTRIBUTE_DEPRECATED= -DU_HAVE_STRTOD_L=1 -DU_HAVE_XLOCALE_H=1 -pipe -Os -arch ppc -std=c11 -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -fno-common -c -I../common -I../common -dynamic -o ./out/tmp/icudt72b_dat.o ./out/tmp/icudt72b_dat.S Error generating assembly code for data. pkgdata: /opt/local/bin/gcc-mp-7 -DU_ATTRIBUTE_DEPRECATED= -DU_HAVE_STRTOD_L=1 -DU_HAVE_XLOCALE_H=1 -pipe -Os -arch ppc -std=c11 -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -fno-common -c -I../common -I../common -dynamic -o ./out/tmp/icudt72b_dat.o ./out/tmp/icudt72b_dat.S gnumake[1]: *** [packagedata] Error 1
comment:10 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
Replying to catap:
I have a crazy idea to use
gcc10-bootstrap
as compiler for 10.4. May I ask you to try to buildgcc10-bootstrap
port?
Probably this evening, 18:00 UTC, all ports that can be upgraded or that can be fixed by me, will be built. What should I be aware of when trying to build gcc10-bootstrap
and some more?
comment:11 Changed 2 years ago by catap (Kirill A. Korinsky)
Peter as far as I know nobody tries to build gcc10-bootstrap
on 10.4 PPC. It may be build, and if yes, you may try to use it to build icu-72; I doubt that it help, but anyway interesting to ask :)
I plan to make a patch for ICU that should replaces a .balign
to .align
and prepare a branch to icu-devel that adds this patch, after that I'll ask you to test it. It should allow to build it, and probably it will work fine ;)
comment:12 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
The build has started and reached stage1.
Would it make sense to open a new case where I can report observations? And possible failures?
comment:13 Changed 2 years ago by catap (Kirill A. Korinsky)
Peter, if gcc10-bootstrap is failed, yes, I'd like to ask you to open an issue for me.
comment:14 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
After almost 50 hours the build succeeded three hours ago. (Log is saved.)
comment:15 Changed 2 years ago by catap (Kirill A. Korinsky)
Peter, thanks for testing!
May I ask you to try build icu-devel from this branch? https://github.com/catap/macports-ports/tree/icu-devel
I've switched from .balign
to .align
for the case of macOS on PPC before 10.5 It may work.
Thanks.
P.S. it is a kind of blind shot, I haven't tested it
comment:16 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
I tried to run gmake check
from this port's "home directory" – only FAILures were reported. (Because conftest.dSYM
directories are left?)
Right now icu-devel/Portfile
has a date from two weeks ago. Is this usable?
comment:17 Changed 2 years ago by catap (Kirill A. Korinsky)
I see. I haven't created a PR to MacPorts ports tree because I haven't tested it yet :)
So, it exists only as a branch in my fork of MacPorts ports tree.
To make things easy may you try this patch https://raw.githubusercontent.com/catap/macports-ports/091c149c8ba07cca682a1008fe4d866ebdeb3b59/devel/icu-devel/files/patch-balign-to-align.diff to any used icu port?
comment:18 Changed 2 years ago by kencu (Ken)
it would be unexpected to find the "gas" assembler on Leopard PPC can accept ".balign".
comment:19 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
The build of icu-devel
has not yet reached the patched pkg_genc.cpp
, but it throws complaints as the build of gcc10-bootstrap
did:
/usr/bin/../libexec/gcc/darwin/ppc/as: I don't understand 'm' flag! /usr/bin/../libexec/gcc/darwin/ppc/as: Flag option -m has already been seen! /usr/bin/../libexec/gcc/darwin/ppc/as: I don't understand 'm' flag! /usr/bin/../libexec/gcc/darwin/ppc/as: I don't understand 'a' flag! /usr/bin/../libexec/gcc/darwin/ppc/as: I don't understand 'c' flag! /usr/bin/../libexec/gcc/darwin/ppc/as: Flag option -o has already been seen!
So there must be some "typo" while/from building gcc10-bootstrap
. Before all Assembler code was compiled invisibly.
comment:20 follow-up: 23 Changed 2 years ago by kencu (Ken)
That happens because of a flag the ancient cctools on Tiger doesn’t understand. Usually causes no failures, but clutters output w the warning.
comment:21 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
Finally a build failure for icu-devel
:
gnumake[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_icu-devel/icu-devel/work/icu/source/data' /bin/sh ../mkinstalldirs ./out DYLD_LIBRARY_PATH=../lib:../stubdata:../tools/ctestfw:$DYLD_LIBRARY_PATH ../bin/icupkg -tb ./in/icudt72l.dat ./out/icudt72b.dat /bin/sh ../mkinstalldirs ./out/tmp ./out/build/icudt72b mkdir ./out/tmp mkdir ./out/build mkdir ./out/build/icudt72b Unpacking ./out/icudt72b.dat and generating out/tmp/icudata.lst (list of data files) DYLD_LIBRARY_PATH=../lib:../stubdata:../tools/ctestfw:$DYLD_LIBRARY_PATH ../bin/icupkg -d ./out/build/icudt72b --list -x \* ./out/icudt72b.dat -o out/tmp/icudata.lst echo timestamp > build-local DYLD_LIBRARY_PATH=../stubdata:../tools/ctestfw:../lib:$DYLD_LIBRARY_PATH ../bin/pkgdata -O ../data/icupkg.inc -q -c -s /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_icu-devel/icu-devel/work/icu/source/data/out/build/icudt72b -d ../lib -e icudt72 -T ./out/tmp -p icudt72b -L icudata -m static -r 72.1 ./out/tmp/icudata.lst /usr/bin/../libexec/gcc/darwin/ppc/as: I don't understand 'm' flag! /usr/bin/../libexec/gcc/darwin/ppc/as: Flag option -m has already been seen! /usr/bin/../libexec/gcc/darwin/ppc/as: I don't understand 'm' flag! /usr/bin/../libexec/gcc/darwin/ppc/as: I don't understand 'a' flag! /usr/bin/../libexec/gcc/darwin/ppc/as: I don't understand 'c' flag! /usr/bin/../libexec/gcc/darwin/ppc/as: Flag option -o has already been seen! ./out/tmp/icudt72b_dat.S:7:77: error: token "." is not valid in preprocessor expressions 7 | #if defined(__ppc__) &&__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050 .align 16 | ^ ./out/tmp/icudt72b_dat.S:8:7: warning: extra tokens at end of #else directive [-Wendif-labels] 8 | #else .balign 16 | ^ ./out/tmp/icudt72b_dat.S:7: error: unterminated #else 7 | #if defined(__ppc__) &&__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050 .align 16 | -- return status = 256 Error creating with assembly code. Failed command: /opt/local/libexec/gcc10-bootstrap/bin/gcc -DU_ATTRIBUTE_DEPRECATED= -DU_HAVE_STRTOD_L=1 -DU_HAVE_XLOCALE_H=1 -pipe -Os -arch ppc -std=c11 -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -fno-common -c -I../common -I../common -dynamic -o ./out/tmp/icudt72b_dat.o ./out/tmp/icudt72b_dat.S Error generating assembly code for data. pkgdata: /opt/local/libexec/gcc10-bootstrap/bin/gcc -DU_ATTRIBUTE_DEPRECATED= -DU_HAVE_STRTOD_L=1 -DU_HAVE_XLOCALE_H=1 -pipe -Os -arch ppc -std=c11 -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -fno-common -c -I../common -I../common -dynamic -o ./out/tmp/icudt72b_dat.o ./out/tmp/icudt72b_dat.S gnumake[1]: *** [packagedata] Error 1 gnumake[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_icu-devel/icu-devel/work/icu/source/data'
Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
Attachment: | main.2.log added |
---|
Main.log for icu-devel with gcc10-bootstrap from PPC Tiger, Mac OS X 10.4.11
comment:22 Changed 2 years ago by catap (Kirill A. Korinsky)
Ken, indeed, included it into the condition.
Peter, thanks for testing!
Sorry, I've forgot about \n
in my patch :(
An updated patch is force-pushed to my branch or available via https://raw.githubusercontent.com/catap/macports-ports/29e43d7dc514e114fb074912747ba47ac5f0bf32/devel/icu-devel/files/patch-balign-to-align.diff
May I ask you to try it one more time?
Thanks.
comment:23 follow-up: 26 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
Replying to kencu:
That happens because of a flag the ancient cctools on Tiger doesn’t understand. Usually causes no failures, but clutters output w the warning.
Is it possible to patch cctools
to work more accurately?
comment:24 follow-up: 32 Changed 2 years ago by catap (Kirill A. Korinsky)
BTW, I not sure that gcc10-bootstrap
is required to build icu with this patch. I think that usual GCC should be enough :)
comment:25 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
I can try that, too. Will become evening then, here…
comment:26 follow-up: 27 Changed 2 years ago by kencu (Ken)
Replying to ballapete:
Replying to kencu:
That happens because of a flag the ancient cctools on Tiger doesn’t understand. Usually causes no failures, but clutters output w the warning.
Is it possible to patch
cctools
to work more accurately?
Done, in 2005 or so.
But this build is using the original assembler in Tiger, it seems.
comment:27 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
Replying to kencu:
But this build is using the original assembler in Tiger, it seems.
Maybe I installed the wrong variant: cctools @949.0.1_2+xcode
. Its /opt/local/bin/as
is a shell script:
#!/bin/bash if [[ -x /usr/bin/xcrun ]] ; then exec /usr/bin/xcrun as "${@}" elif [[ -x /usr/bin/as ]] ; then exec /usr/bin/as "${@}" else exec as "${@}" fi
which leads to excuting `Apple Computer, Inc. version cctools-622.9~2, GNU assembler version 1.38´, the only Assembler compiler on board…
comment:29 Changed 2 years ago by kencu (Ken)
We should add a bunch more tests for stuff like this to
port diagnose
comment:30 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
The build succeeded with gcc10-bootstrap
:
/opt/local/libexec/gcc10-bootstrap/bin/g++ -DU_ATTRIBUTE_DEPRECATED= -DU_TOOLUTIL_IMPLEMENTATION -DU_HAVE_STRTOD_L=1 -DU_HAVE_XLOCALE_H=1 -I. -I../../common -I../../i18n "-DU_BUILD=\"powerpc-apple-darwin8.11.0\"" "-DU_HOST=\"powerpc-apple-darwin8.11.0\"" "-DU_CC=\"/opt/local/libexec/gcc10-bootstrap/bin/gcc\"" "-DU_CXX=\"/opt/local/libexec/gcc10-bootstrap/bin/g++\"" -DUNISTR_FROM_CHAR_EXPLICIT=explicit -DUNISTR_FROM_STRING_EXPLICIT=explicit -pipe -Os -D_GLIBCXX_USE_CXX11_ABI=0 -arch ppc -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long -std=c++11 -fvisibility=hidden -fno-common -c -dynamic -MMD -MT "pkg_genc.d pkg_genc.o pkg_genc.ao" -o pkg_genc.o pkg_genc.cpp /usr/bin/../libexec/gcc/darwin/ppc/as: I don't understand 'm' flag! /usr/bin/../libexec/gcc/darwin/ppc/as: Flag option -m has already been seen! /usr/bin/../libexec/gcc/darwin/ppc/as: I don't understand 'm' flag! /usr/bin/../libexec/gcc/darwin/ppc/as: I don't understand 'a' flag! /usr/bin/../libexec/gcc/darwin/ppc/as: I don't understand 'c' flag! /usr/bin/../libexec/gcc/darwin/ppc/as: Flag option -o has already been seen! pkg_genc.cpp: In function 'uint32_t write32(FileStream*, uint32_t, uint32_t)': pkg_genc.cpp:588:23: warning: comparison of integer expressions of different signedness: 'int32_t' {aka 'int'} and 'long unsigned int' [-Wsign-compare] 588 | for (i = 0; i < sizeof(uint32_t); i++) | ~~^~~~~~~~~~~~~~~~~~
comment:31 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
port test …
resulted in [All tests passed successfully...]
. So I am going to try a build with the default compiler
.
comment:32 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
Replying to catap:
BTW, I not sure that
gcc10-bootstrap
is required to build icu with this patch. I think that usual GCC should be enough :)
Yes, it built also with GCC 7
. The patch
rules!
comment:33 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
I think the regular port
will upgrade with that patch
…
comment:34 Changed 2 years ago by catap (Kirill A. Korinsky)
Peter, thanks for testing.
I've created a PR for icu-devel
https://github.com/macports/macports-ports/pull/16740 and would like to wait a few weeks before update the main ICU port, that allows folks with PPC to test it.
comment:35 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
Regular icu port
was upgraded thanks to the patch supplied.
comment:36 Changed 2 years ago by catap (Kirill A. Korinsky)
comment:37 follow-up: 39 Changed 2 years ago by catap (Kirill A. Korinsky)
Peter, you may install icu-devel
port instead of icu
;) it works just fine.
comment:38 Changed 2 years ago by catap (Kirill A. Korinsky)
I've backported a patch to upstream: https://github.com/unicode-org/icu/pull/2257
And in one week I'll open a PR to main ICU port that should make things better for PPC
comment:39 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
Replying to catap:
Peter, you may install
icu-devel
port instead oficu
;) it works just fine.
I do not see the proof:
tiger pete 224 /\ foreach PORT ( `port echo dependentof:icu` ) foreach -> port deps $PORT foreach -> end Full Name: boost176 @1.76.0_6+no_single+no_static+python310 Extract Dependencies: lbzip2 Build Dependencies: gcc7 Library Dependencies: bzip2, expat, icu, libiconv, lzma, zlib, zstd, python310, libgcc Full Name: harfbuzz-icu @5.3.1_0 Extract Dependencies: xz Build Dependencies: pkgconfig, gcc7 Library Dependencies: harfbuzz, icu, libgcc Full Name: libxml2 @2.10.3_1 Extract Dependencies: xz Build Dependencies: pkgconfig, apple-gcc42 Library Dependencies: libiconv, icu, xz, zlib Full Name: libxslt @1.1.37_1 Extract Dependencies: xz Build Dependencies: pkgconfig, apple-gcc42 Library Dependencies: icu, libiconv, libxml2, zlib Full Name: openldap @2.6.3_4 Build Dependencies: apple-gcc42 Library Dependencies: perl5, tcp_wrappers, cyrus-sasl2, libfetch, openssl, db48, icu, legacy-support Test Dependencies: coreutils Full Name: texlive-bin @2022.62882_2+x11 Extract Dependencies: xz Build Dependencies: perl5, pkgconfig, gcc7 Library Dependencies: fontconfig, freetype, libpng, ncurses, zlib, libzzip, cairo, libpixman, graphite2, icu, harfbuzz, harfbuzz-icu, libpaper, gmp, mpfr, potrace, poppler, texlive-common, xorg-libXp, xpm, xorg-libXaw, xorg-libXi, libgcc Runtime Dependencies: ghostscript
The ports that use icu
do not accept icu-devel
. And icu-devel
has Conflicts with: icu, icu-lx, icu-docs
.
comment:40 Changed 2 years ago by catap (Kirill A. Korinsky)
Yes, it installs icu
by default. But all ports depends on icu as path:lib/pkgconfig/icu-uc.pc:icu
and not port:icu
that allows to install icu-devel
port instead icu
;)
comment:41 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
I am building GCC 10.4
manually (./gcc-10.4.0/configure --enable-languages=c,c++,objc,obj-c++ --enable-bootstrap --with-system-zlib --without-zstd --disable-nls --disable-tls --enable-multilib --enable-multiarch --with-dwarf2 --enable-targets=i386-apple-darwin8,powerpc-apple-darwin8 --with-gmp-include=/opt/local/include --with-gmp-lib=/opt/local/lib --with-mpfr-include=/opt/local/include --with-mpfr-lib=/opt/local/lib --with-mpc-include=/opt/local/include --with-mpc-lib=/opt/local/lib
), using GCC 7
and other modern tools. One of them is cctools @949.0.1
. Its as
understands .balign and .p2align
. So it might be better to build icu
with modern tools…?
comment:42 follow-up: 43 Changed 2 years ago by kencu (Ken)
newer cctools does NOT understand .balign or .p2align . The assembler is dated about 2006, and not updated much since.
cctools passes assembly to clang on Intel systems, and clang does understand those, but not on ppc of course.
so you’re wasting your time with that.
If you want gcc10 Right Now, use gcc10-bootstrap, as it is complicated to build and integrate a new gcc into macports.
A serious effort to update older systems to gcc12 is just in the beginning stages now. Wait for that to finish
comment:43 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
Replying to kencu:
newer cctools does NOT understand .balign or .p2align . The assembler is dated about 2006, and not updated much since.
cctools passes assembly to clang on Intel systems, and clang does understand those, but not on ppc of course.
so you’re wasting your time with that.
That's alright. I am unemployed since a few weeks, and in February retirement is awaiting me…
Ken, my Tiger runs on a PowerPC G4 processor. And when I use /opt/local/bin/as, configure (from manually building GCC 10.4 unpatched) tells me in stages 1 and 2 (hasn't come further yet) when performing its work in ./gcc:
checking assembler for .balign and .p2align... yes
instead of
checking assembler for .balign and .p2align... no
because /opt/local/bin/as is almost up-to-date:
-rw-r--r-- fredzlotnick/staff 26792 2020-02-28 19:02 cctools-949.0.1/as/as.c
(According to my calendar.)
OK, when this only works on PPC, then a patch is of course necessary in order to not discriminate intel CPUs.
Besides, my effort is to find faults in the configure scripts. I reported them from the GCC 10.3 bootstrap builds and was asked to better report those from the recent version.
To me it seems an improvement to start building GCC 10 with modern tools. In the end the installed software will be built by GCC 10 and not the system's tools. Maybe it's worth to create a variant for gcc10-bootstrap that just uses the system's installations of gmp, isl, mpfr, and mpc in order to save some disk space (there aren't so many 2,5" disks with PATA interface and more than 100 GB capacity):
183915 2436 -rw-r--r-- 2 macports admin 2493916 Nov 19 2020 distfiles/gcc/gmp-6.2.1.tar.bz2 188589 2212 -rw-r--r-- 2 macports admin 2261594 Jan 1 2022 distfiles/gcc/isl-0.24.tar.bz2 183577 820 -rw-r--r-- 2 macports admin 838731 Okt 24 2020 distfiles/gcc/mpc-1.2.1.tar.gz 191530 1708 -rw-r--r-- 1 macports admin 1747243 Nov 17 14:13 distfiles/gcc/mpfr-4.1.0.tar.bz2 183915 2436 -rw-r--r-- 2 macports admin 2493916 Nov 19 2020 distfiles/gmp/gmp-6.2.1.tar.bz2 188589 2212 -rw-r--r-- 2 macports admin 2261594 Jan 1 2022 distfiles/isl/isl-0.24.tar.bz2 183577 820 -rw-r--r-- 2 macports admin 838731 Okt 24 2020 distfiles/libmpc/mpc-1.2.1.tar.gz 148931 1412 -rw-r--r-- 1 macports admin 1441996 Feb 10 2019 distfiles/mpfr/4.0.2/mpfr-4.0.2.tar.xz 148932 1492 -rw-r--r-- 1 macports admin 1525476 Okt 3 2020 distfiles/mpfr/mpfr-4.1.0.tar.xz
Hard links created by me. (Could be cleaner, and closer to perfection, as I see now – by using more up-to-date compression.)
comment:44 follow-up: 45 Changed 2 years ago by kencu (Ken)
Just for the record:
/opt/local/bin/gcc-mp-7
already uses
/opt/local/bin/as
as the assembler.
So you don't have to do anything to make it use that as the assembler.
Can we ask for you help? We need someone to try building the new gcc12/libgcc12 transition on Tiger as part of the upcoming big move. I gave up on it two years ago, as it is too much work for one person. But now there is a group, perhaps.
comment:45 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
Replying to kencu:
Just for the record:
/opt/local/bin/gcc-mp-7already uses
/opt/local/bin/asas the assembler.
This did not happen when I built gcc10-bootstrap
. I tried it twice…
Can we ask for you help? We need someone to try building the new gcc12/libgcc12 transition on Tiger as part of the upcoming big move. I gave up on it two years ago, as it is too much work for one person. But now there is a group, perhaps.
Alright! The build of GCC 10.4 will presumingly end today. Then I'll check the configure output and shall report flaws. Are a Portfile or a useful description available?
Yesterday I forgot to mention these:
191528 1528 -rw-r--r-- 1 macports admin 1564560 Nov 17 14:19 distfiles/gcc/make-3.81.tar.gz 183068 1240 -rw-r--r-- 1 macports admin 1266180 Mai 26 2020 distfiles/gmake/make-4.3.tar.lz 191475 1256 -rw-r--r-- 1 macports admin 1283355 Nov 11 00:56 distfiles/gmake/make-4.4.tar.lz
comment:46 Changed 2 years ago by catap (Kirill A. Korinsky)
This did not happen when I built gcc10-bootstrap. I tried it twice…
gcc10-bootstrap
is quite special things. It contains more than 80 patches and it is built in environment that prevent it to use anything from MacPorts.
comment:47 Changed 2 years ago by kencu (Ken)
we are going to need to force gcc10-bootstrap to use /opt/local/bin/as at times, so hopefully the way to do that won’t prove difficult.
similar w ld
comment:48 Changed 2 years ago by kencu (Ken)
icu builds and installs for me on Tiger PPC without touching a single thing in the Portfile:
$ port -v installed icu The following ports are currently installed: icu @67.1_4 requested_variants='' platform='darwin 8' archs='ppc' date='2022-08-17T19:55:44-0700' icu @72.1_0 (active) requested_variants='' platform='darwin 8' archs='ppc' date='2022-11-28T13:32:37-0800'
It builds with the stock gcc7 currently in use for MacPorts.
So ... ? how about you clean everything up, update your ports, and try again? Make sure your system is all stock, no modified toolchains, no alternative cctools or linker versions, no forcing of any compilers.
Just stock.
comment:49 Changed 2 years ago by catap (Kirill A. Korinsky)
Ken, an easy way to enforce used as
or ld
is create a folder which contains symlink to as/ld which you would like to use, and put this folder as the first one at PATH.
It has a few edge cases but it works :)
comment:50 Changed 2 years ago by kencu (Ken)
I showed you that trick :)
It might work generally, but if you think for a moment, gcc10-bootstrap should ALREADY find the newer cctools and ld if installed then, and maybe it does, but this user indicated it did not.
TBH, I have to test these things myself to be sure.
But need to have something that is the recommended way, that people can just copy/paste and not mess up…. and that might be it…
Also, similar for clang-11-bootstrap, but there are many more tools to consider there…
comment:51 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
configure --help
tells that setting an environment variable AS with the correct value for configure should work. I simplified my manual build of GCC 10.4 by setting PATH accordingly, /opt/local/bin as first element.
comment:52 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
GCC 10.4 has built manually (within 40 hours), the compilation log is evaluated and I can send two eMails soon. In the meantime I selfupdated port on PPC Tiger and upgraded gawk. All installed ports are according to "stock" since I upgraded Python3 to Python 3.10. But icu still wants Python 2.7, and I do not want it any more. It's not secure, it's outdated, it's past perfect. Therefore I cannot try to build icu again.
On Big Sur icu has no dependencies. Why do such exist on Tiger? (Besides GCC 7?) On Big Sur only Python 3 exists – why is this not working or sufficient on Tiger?
comment:53 follow-up: 54 Changed 2 years ago by kencu (Ken)
Resolution: | → worksforme |
---|---|
Status: | new → closed |
OK, I'm going to close this ticket now, as icu builds just fine on Tiger without doing anything to any Portfiles. I will attach the log from the rebuild for you to look at.
It is something you are doing on your system that must have broken it, and to be honest, I can't follow everything you did.
Please just undo it all, and try again. ICU does not need fixing.
Changed 2 years ago by kencu (Ken)
Attachment: | icu.log.gz added |
---|
comment:54 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
Replying to kencu:
Please just undo it all, and try again. ICU does not need fixing.
My problem seems to be that /usr/bin/as is used instead of /opt/local/bin/as, correct? The latter does understand the assembler code.
comment:55 Changed 2 years ago by kencu (Ken)
/usr/bin/as will never be used by MacPorts gcc7 unless you did something to make it do that.
comment:56 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
Ken, there is some twist…
I start to build with:
/usr/bin/install -c ./config/icu-config-top config/icu-config /usr/bin/gnumake[0]: Making `all' in `stubdata' /usr/bin/gnumake[0]: Making `all' in `common' /usr/bin/ranlib: file: ../lib/libicuuc.a(cwchar.ao) has no symbols /usr/bin/ranlib: file: ../lib/libicuuc.a(icuplug.ao) has no symbols /usr/bin/ranlib: file: ../lib/libicuuc.a(restrace.ao) has no symbols /usr/bin/ranlib: file: ../lib/libicuuc.a(wintz.ao) has no symbols /usr/bin/ranlib: file: ../lib/libicuuc.a(cwchar.ao) has no symbols /usr/bin/ranlib: file: ../lib/libicuuc.a(icuplug.ao) has no symbols /usr/bin/ranlib: file: ../lib/libicuuc.a(restrace.ao) has no symbols /usr/bin/ranlib: file: ../lib/libicuuc.a(wintz.ao) has no symbols /usr/bin/gnumake[0]: Making `all' in `i18n' /usr/bin/ranlib: file: ../lib/libicui18n.a(windtfmt.ao) has no symbols /usr/bin/ranlib: file: ../lib/libicui18n.a(winnmfmt.ao) has no symbols /usr/bin/ranlib: file: ../lib/libicui18n.a(wintzimpl.ao) has no symbols /usr/bin/ranlib: file: ../lib/libicui18n.a(windtfmt.ao) has no symbols /usr/bin/ranlib: file: ../lib/libicui18n.a(winnmfmt.ao) has no symbols /usr/bin/ranlib: file: ../lib/libicui18n.a(wintzimpl.ao) has no symbols /usr/bin/gnumake[0]: Making `all' in `io'
and you start to build on two CPU cores with:
/usr/bin/install -c ./config/icu-config-top config/icu-config /usr/bin/gnumake[0]: Making `all' in `stubdata' /usr/bin/gnumake[0]: Making `all' in `common' /opt/local/bin/ranlib: file: ../lib/libicuuc.a(cwchar.ao) has no symbols /opt/local/bin/ranlib: file: ../lib/libicuuc.a(icuplug.ao) has no symbols /opt/local/bin/ranlib: file: ../lib/libicuuc.a(restrace.ao) has no symbols /opt/local/bin/ranlib: file: ../lib/libicuuc.a(wintz.ao) has no symbols /usr/bin/gnumake[0]: Making `all' in `i18n' /opt/local/bin/ranlib: file: ../lib/libicui18n.a(windtfmt.ao) has no symbols /opt/local/bin/ranlib: file: ../lib/libicui18n.a(winnmfmt.ao) has no symbols /opt/local/bin/ranlib: file: ../lib/libicui18n.a(wintzimpl.ao) has no symbols /usr/bin/gnumake[0]: Making `all' in `io'
I am not aware of any change I applied to the MacPorts build system. On Tiger my search path is: /Users/pete/bin:/opt/local/bin:/opt/local/libexec/perl5.34:/usr/X11R6/bin:/usr/local/clamXav/bin:/usr/local/bin:/bin:/usr/bin:/usr/sbin:/opt/local/sbin:/usr/local/clamXav/sbin:/usr/local/sbin:/Developer/Tools:/Users/pete/bin:/sbin:/usr/local/texlive/2009/bin:/Users/pete/bin/FDK/Tools/osx. And root, which operates MacPorts, has: /var/root/bin:/usr/libexec:/opt/local/bin:/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin:/opt/local/bin:/opt/local/sbin.
comment:57 Changed 2 years ago by kencu (Ken)
I have the stock path setup, for both user and root:
PATH=/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin
I am not sure what, if anything, is in your path that may or may not cause trouble, but it is a 10 second fix to check if the stock path fixes you up, and then you'll know.
comment:58 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
I think I fixed the PATH issue. Particularly GNU Emacs, in which I work with MacPorts, has a proper process environment. It's "tested" by logging out and in and by rebooting. Final proof: icu built – without the balign patch in icu-devel.
comment:60 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
When will GCC 1x test work start? In case this has some time I would boot into Leopard and clean it from Python 3.9 and old stuff.
comment:61 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
It built in my corrected setup, so the ticket can be closed. (Or is there a need to contact me for GCC 1x
testing?)
comment:62 follow-up: 63 Changed 2 years ago by catap (Kirill A. Korinsky)
Peter, I'd like to ask your help and test https://github.com/macports/macports-ports/pull/16922 on your hardware.
comment:63 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
Replying to catap:
Building icu-devel
and test
ing it?
comment:65 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
Up-to-date? -rw-r--r-- 1 root x11 10277 21 Nov 06:39 /opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/devel/icu-devel/Portfile
comment:66 Changed 2 years ago by catap (Kirill A. Korinsky)
Peter, may I ask you to replace patch patch-balign-to-align.diff
to https://raw.githubusercontent.com/macports/macports-ports/dfa7bc0d278e0a26ad3fbcce5055406d700b3850/devel/icu-devel/files/patch-balign-to-align.diff ?
Thanks.
comment:67 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
So I do not have to wait for a new version of Portfile
but just substitute the patch-balign-to-align.diff
file? And start building and testing right away?
comment:69 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
I removed the dependancy to dead Python 2.7
.
comment:70 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
Build started some time ago with /usr/bin/gnumake
and /opt/local/bin/g++-mp-7 -std=c++11
, new patch succeeded…
comment:71 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
Build succeeded, and test too, OK, one hour ago. Do you want any results?
comment:72 Changed 2 years ago by catap (Kirill A. Korinsky)
Nope, thanks!
I've pushed this patch to upstream.
Main.log from Tiger PPC, Mac OS X 10.4.11