Opened 19 months ago

Closed 18 months ago

Last modified 18 months ago

#67428 closed defect (fixed)

icu @73.1 does not build on PPC Tiger, Mac OS X 10.4.11, because ld: -rpath can only be used when targeting Mac OS X 10.5 or later

Reported by: ballapete (Peter "Pete" Dyballa) Owned by: evanmiller (Evan Miller)
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: tiger ppc Cc: kirill@…, evanmiller (Evan Miller)
Port: icu

Description

gnumake[1]: Entering 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/stubdata'
/opt/local/bin/gcc-mp-7 -dynamiclib -dynamic -pipe -Os -arch ppc -std=c11 -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings   -Wl,-headerpad_max_install_names -arch ppc -Wl,-rpath,/opt/local/lib   -Wl,-compatibility_version -Wl,73 -Wl,-current_version -Wl,73.1 -install_name /opt/local/lib/libicudata.73.dylib -o libicudata.73.1.dylib stubdata.o 
ld: -rpath can only be used when targeting Mac OS X 10.5 or later
collect2: error: ld returned 1 exit status
gnumake[1]: *** [libicudata.73.1.dylib] Error 1

It's not advised to use on purpose --enable-rpath as configure argument.

Change History (17)

comment:1 Changed 19 months ago by evanmiller (Evan Miller)

To get this working I used --disable-rpath and then manually ran install_name_tool to fix up the path names. E.g. lots of

port contents icu | grep /bin | xargs -n 1 install_name_tool -change libicutu.73.dylib /opt/local/lib/libicutu.73.dylib
install_name_tool -id /opt/local/lib/libicutu.73.dylib /opt/local/lib/libicutu.73.dylib

comment:2 Changed 19 months ago by evanmiller (Evan Miller)

Cc: evanmiller added

comment:3 Changed 19 months ago by ballapete (Peter "Pete" Dyballa)

I started to track the failures with rpath in #67433. Just recently a new build of previous version finished – and it looks OK! Just as before. I am letting port fix all installed software depending on icu and libxml2. After sleep, when my PowerBook G4 might have finished, I shall probably upgrade more software and then "play" with the recent version.

Thank you for showing the commands to fix the rpath settings!

comment:4 Changed 19 months ago by evanmiller (Evan Miller)

comment:5 Changed 19 months ago by kencu (Ken)

Yes, that PR basically undoes @catap's recent switch to dump the patch we've been using for decades, and use the configure argument... we should know by now that when you change something that's been in place that many years, something bad will happen.

It would seem just go back to the patch on all systems, for consistency on all of them, and be done with it rather than always special-casing Tiger. (but I have a feeling we will sadly special case Tiger needlessly anyway, you watch :> ).

The configure arg is broken anyway - "--enable-rpath" on newer systems doesn't actually enable rpaths in the built libraries (although it apparently does slip this pointless bugger into the executables -Wl,-rpath,/opt/local/lib which is why we missed it a few weeks back).

comment:6 Changed 19 months ago by evanmiller (Evan Miller)

I'm fine with the --enable-rpath argument in case upstream decided to fix what it does – could be a one-line change for them.

ICU has had plenty of tickets about this.

https://unicode-org.atlassian.net/jira/software/c/projects/ICU/issues/ICU-21921

https://unicode-org.atlassian.net/jira/software/c/projects/ICU/issues/ICU-21458

https://unicode-org.atlassian.net/jira/software/c/projects/ICU/issues/ICU-21188

comment:7 Changed 19 months ago by ballapete (Peter "Pete" Dyballa)

With this Portfile

-rw-r--r-- 1 root x11 10170 16. Mai 16:11 /opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/devel/icu/Portfile

no working binaries were built here on PPC Tiger. The list of binaries is a bit larger:

/opt/local/bin/derb:          data
/opt/local/bin/genbrk:        data
/opt/local/bin/gencfu:        data
/opt/local/bin/gencnval:      data
/opt/local/bin/gendict:       data
/opt/local/bin/genrb:         data
/opt/local/bin/icu-config:    ASCII text, with very long lines (613)
/opt/local/bin/icuexportdata: data
/opt/local/bin/icuinfo:       data
/opt/local/bin/makeconv:      data
/opt/local/bin/pkgdata:       data
/opt/local/bin/uconv:         data
/opt/local/sbin/escapesrc:    data
/opt/local/sbin/genccode:     data
/opt/local/sbin/gencmn:       data
/opt/local/sbin/gennorm2:     data
/opt/local/sbin/gensprep:     data
/opt/local/sbin/icupkg:       data

A ggrep bin/ selects them, a ggrep bin/ | ggrep -v icu-config leaves the shell script out.

The 17 binaries use up to six shared ICU libraries (presumingly, just preparing my future work):

/opt/local/lib/libicudata.73.dylib
/opt/local/lib/libicui18n.73.dylib
/opt/local/lib/libicuio.73.dylib
/opt/local/lib/libicutest.73.dylib
/opt/local/lib/libicutu.73.dylib
/opt/local/lib/libicuuc.73.dylib

A loop à la "for each binary invoke six times install_name_tool" and another similar one for each of the six dylibs with sixfold invocation of install_name_tool should make the software usable…

comment:8 Changed 19 months ago by evanmiller (Evan Miller)

@ballapete See solution linked in comment 4 above.

comment:9 in reply to:  8 Changed 19 months ago by ballapete (Peter "Pete" Dyballa)

Replying to evanmiller:

@ballapete See solution linked in comment 4 above.

You mean simply removing line 62 in icu/icu4c/source/config/Makefile.inc.in?

For me it's now After Dinner here and I feel ready for some loopings…

comment:10 Changed 18 months ago by kencu (Ken)

If upstream actually fixed the "--enable-rpath" argument then it would be the exact wrong thing for macports anyways :>

The current use of the "--enable-rpath" argument counts on the fact that it is actually broken.

Last edited 18 months ago by kencu (Ken) (previous) (diff)

comment:11 Changed 18 months ago by kencu (Ken)

perhaps use "--disable-rpath" again on all systems, which is what we want (no rpaths), and then put the patch back to fix the broken pathnames.

Last edited 18 months ago by kencu (Ken) (previous) (diff)

comment:12 Changed 18 months ago by ballapete (Peter "Pete" Dyballa)

I performed

 • port extract icu
 • editing /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/config/Makefile.inc.in
 • port build icu

and got now:

root 462 /\ gfind /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_icu/icu/work/icu -type f -name icuinfo -ls
 99659208     24 -rwxr-xr-x   1 macports admin       22900 Mai 17 08:39 /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/tools/icuinfo/icuinfo
root 463 /\ otool -L /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/tools/icuinfo/icuinfo
/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/tools/icuinfo/icuinfo:
	libicutu.73.dylib (compatibility version 73.0.0, current version 73.1.0)
	libicui18n.73.dylib (compatibility version 73.0.0, current version 73.1.0)
	libicuuc.73.dylib (compatibility version 73.0.0, current version 73.1.0)
	libicudata.73.dylib (compatibility version 73.0.0, current version 73.1.0)
	/opt/local/lib/libgcc/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.24.0)
	/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/opt/local/lib/libgcc/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.12)

I think it's already (and still) a faulty build. Nevertheless I'll upgrade and check that it's still not working. With the old version saved I can easily get a working icu installation.

comment:13 Changed 18 months ago by ballapete (Peter "Pete" Dyballa)

Faulty:

root 465 /\ port -v installed icu
The following ports are currently installed:
  icu @72.1_0 requested_variants='' platform='darwin 8' archs='ppc' date='2023-05-16T00:06:45+0200'
  icu @73.1_0 (active) requested_variants='' platform='darwin 8' archs='ppc' date='2023-05-17T09:20:06+0200'
root 466 /\ otool -L /opt/local/bin/icuinfo
/opt/local/bin/icuinfo:
	libicutu.73.dylib (compatibility version 73.0.0, current version 73.1.0)
	libicui18n.73.dylib (compatibility version 73.0.0, current version 73.1.0)
	libicuuc.73.dylib (compatibility version 73.0.0, current version 73.1.0)
	libicudata.73.dylib (compatibility version 73.0.0, current version 73.1.0)
	/opt/local/lib/libgcc/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.24.0)
	/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/opt/local/lib/libgcc/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.12)

comment:14 Changed 18 months ago by catap (Kirill A. Korinsky)

Evan, may you also open a PR to ICU upstream to with fix which fixes enable/disable rpath?

From my point of view it should be enabled by default and works without patches, and --disable-rpath should fix build on 10.4

Ken?

comment:15 Changed 18 months ago by evanmiller (Evan Miller)

In 1306d1ef0acbd17b98513c87a138930a2f1b0d79/macports-ports (master):

icu-devel: fix build on Tiger and clean up rpath mess

See: #67433
See: #67428

comment:16 Changed 18 months ago by evanmiller (Evan Miller)

Owner: set to evanmiller
Resolution: fixed
Status: newclosed

comment:17 Changed 18 months ago by ballapete (Peter "Pete" Dyballa)

It built successfully on PPC Tiger and PPC Leopard, Mac OS X 10.4.11/10.5.8.

Note: See TracTickets for help on using tickets.