Opened 10 months ago
Closed 7 months ago
#69112 closed defect (fixed)
libpaper-utils uses rpath instead of the absolute path and installs a broken paperconf binary
Reported by: | barracuda156 | Owned by: | barracuda156 |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.1 |
Keywords: | Cc: | ballapete (Peter "Pete" Dyballa) | |
Port: | libpaper-utils |
Description
svacchanda@43-95 ~ % otool -L /opt/local/bin/paperconf /opt/local/bin/paperconf: @rpath/libpaper.2.dylib (compatibility version 4.0.0, current version 4.2.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1336.61.1)
Same problem on 14.2.1 and 10.6. So presumably it is just wrong across the board.
It cannot be used:
svacchanda@43-95 ~ % /opt/local/bin/paperconf dyld[39866]: Library not loaded: @rpath/libpaper.2.dylib Referenced from: <63422625-29AE-30E4-A7CC-67B4ECA900EB> /opt/local/bin/paperconf Reason: no LC_RPATH's found zsh: abort /opt/local/bin/paperconf
Attachments (2)
Change History (15)
comment:1 Changed 10 months ago by kencu (Ken)
comment:2 Changed 10 months ago by barracuda156
Owner: | set to barracuda156 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:3 follow-up: 7 Changed 9 months ago by ballapete (Peter "Pete" Dyballa)
I see a related problem when building on PPC Tiger, Mac OS X 10.4.11:
make[3]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_print_libpaper/libpaper/work/libpaper-2.1.2/src' /opt/local/bin/gcc-apple-4.2 -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -DINSTALLDIR=\"/opt/local/bin\" -I../src/libgnu -I../src/libgnu -I../lib -I../lib -DREAL_INSTALLPREFIX="\"/opt/local\"" -isystem/opt/local/include/LegacySupport -I/opt/local/include -pipe -Os -arch ppc -MT paper-paper.o -MD -MP -MF .deps/paper-paper.Tpo -c -o paper-paper.o `test -f 'paper.c' || echo './'`paper.c mv -f .deps/paper-paper.Tpo .deps/paper-paper.Po /bin/sh .././build-aux//libtool-reloc /bin/sh ../libtool --tag=CC --mode=link /opt/local/bin/gcc-apple-4.2 -std=gnu99 -pipe -Os -arch ppc `".././build-aux//reloc-ldflags" "powerpc-apple-darwin8.11.0" "/opt/local/lib" /opt/local/bin` -Wl,-headerpad_max_install_names -L/opt/local/lib -lMacportsLegacySupport -arch ppc -o paper paper-paper.o ../lib/libpaper.la ../src/libgnu/libgnupaper.la libtool: link: /opt/local/bin/gcc-apple-4.2 -std=gnu99 -pipe -Os -arch ppc -Wl,-rpath -Wl,@loader_path/../lib -Wl,-headerpad_max_install_names -arch ppc -o .libs/paper paper-paper.o -L/opt/local/lib ../lib/.libs/libpaper.dylib ../src/libgnu/.libs/libgnupaper.a -lMacportsLegacySupport ld: -rpath can only be used when targeting Mac OS X 10.5 or later collect2: ld returned 1 exit status make[3]: *** [paper] Error 1 make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_print_libpaper/libpaper/work/libpaper-2.1.2/src'
comment:4 Changed 9 months ago by ballapete (Peter "Pete" Dyballa)
Cc: | ballapete added |
---|
comment:5 Changed 9 months ago by ballapete (Peter "Pete" Dyballa)
My Portfile
from 2024-01-16 has:
43 configure.args --enable-relocatable \ 44 --disable-silent-rules 45 46 if {${subport} eq ${name}} { 47 test.run yes 48 test.target check 49 50 post-destroot { 51 # Using --enable-relocatable is unfortunately needed for the 52 # tests to work, but we don't actually want to use rpath in the 53 # installed library. 54 system "install_name_tool -id \ 55 ${prefix}/lib/libpaper.2.dylib \ 56 ${destroot}${prefix}/lib/libpaper.2.dylib" 57 # remove `paper` and `paperconf` 58 delete "${destroot}${prefix}/bin" 59 delete "${destroot}${prefix}/share/man/man1" 60 } 61 } else { 62 depends_lib-append port:libpaper 63 64 post-destroot { 65 # https://trac.macports.org/ticket/69112 66 foreach bin {paper paperconf} { 67 system "install_name_tool -change @rpath/libpaper.2.dylib \ 68 ${prefix}/lib/libpaper.2.dylib \ 69 ${destroot}${prefix}/bin/$bin" 70 } 71 # remove library-related files (which are already present) 72 delete "${destroot}${prefix}/etc" 73 delete "${destroot}${prefix}/include" 74 delete "${destroot}${prefix}/lib" 75 delete "${destroot}${prefix}/share/doc/libpaper" 76 delete "${destroot}${prefix}/share/man/man5" 77 } 78 }
Changed 9 months ago by ballapete (Peter "Pete" Dyballa)
Main.log from PPC Tiger, Mac OS X 10.4.11
comment:6 Changed 9 months ago by ballapete (Peter "Pete" Dyballa)
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Ken, your patch does not work and Portfile does not work (and I do not understand what the patch does):
Hunk #1 FAILED at 39. Hunk #2 succeeded at 60 (offset 1 line). 1 out of 2 hunks FAILED -- saving rejects to file print/libpaper/Portfile.rej
with rejected part:
************** *** 39,48 **** license GPL-3+ GPL-2 } - configure.args --enable-relocatable \ - --disable-silent-rules - if {${subport} eq ${name}} { test.run yes test.target check --- 39,49 ---- license GPL-3+ GPL-2 } if {${subport} eq ${name}} { + + configure.args --enable-relocatable \ + --disable-silent-rules + test.run yes test.target check
comment:7 Changed 9 months ago by barracuda156
Replying to ballapete:
I see a related problem when building on PPC Tiger, Mac OS X 10.4.11:
make[3]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_print_libpaper/libpaper/work/libpaper-2.1.2/src' /opt/local/bin/gcc-apple-4.2 -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -DINSTALLDIR=\"/opt/local/bin\" -I../src/libgnu -I../src/libgnu -I../lib -I../lib -DREAL_INSTALLPREFIX="\"/opt/local\"" -isystem/opt/local/include/LegacySupport -I/opt/local/include -pipe -Os -arch ppc -MT paper-paper.o -MD -MP -MF .deps/paper-paper.Tpo -c -o paper-paper.o `test -f 'paper.c' || echo './'`paper.c mv -f .deps/paper-paper.Tpo .deps/paper-paper.Po /bin/sh .././build-aux//libtool-reloc /bin/sh ../libtool --tag=CC --mode=link /opt/local/bin/gcc-apple-4.2 -std=gnu99 -pipe -Os -arch ppc `".././build-aux//reloc-ldflags" "powerpc-apple-darwin8.11.0" "/opt/local/lib" /opt/local/bin` -Wl,-headerpad_max_install_names -L/opt/local/lib -lMacportsLegacySupport -arch ppc -o paper paper-paper.o ../lib/libpaper.la ../src/libgnu/libgnupaper.la libtool: link: /opt/local/bin/gcc-apple-4.2 -std=gnu99 -pipe -Os -arch ppc -Wl,-rpath -Wl,@loader_path/../lib -Wl,-headerpad_max_install_names -arch ppc -o .libs/paper paper-paper.o -L/opt/local/lib ../lib/.libs/libpaper.dylib ../src/libgnu/.libs/libgnupaper.a -lMacportsLegacySupport ld: -rpath can only be used when targeting Mac OS X 10.5 or later collect2: ld returned 1 exit status make[3]: *** [paper] Error 1 make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_print_libpaper/libpaper/work/libpaper-2.1.2/src'
Well, Tiger needs a dedicated fix, since currently rpath
is removed after the build, but Tiger cannot even build with it.
The portfile works, it just does not work exclusively on Tiger.
comment:8 Changed 9 months ago by ballapete (Peter "Pete" Dyballa)
On my PowerBook G4
these port
s depend on libpaper-utils
ImageMagick dblatex dvipng dvisvgm gd2 gdk-pixbuf2 graphviz gtk3 imlib2 libgsf libheif libpaper librsvg pstoedit shared-mime-info texlive texlive-bin-extra xmlto
or on libpaper
only
fig2dev groff jasper latexmk lcdf-typetools pdfjam ps2eps xpdf
The latter set could be upgraded, but some depend also on faulty GNUlib
or libpixman
or texinfo
. By re-adjusting the version
in Portfile
they might become upgraded…
comment:9 Changed 8 months ago by ballapete (Peter "Pete" Dyballa)
On PPC Tiger, Mac OS X 10.4.11
, it builds with configure option --disable-relocatable
instead of --enable-relocatable
.
comment:10 Changed 8 months ago by ballapete (Peter "Pete" Dyballa)
/usr/bin/make check-TESTS PASS: default-size-environment.sh PASS: default-size-user.sh SKIP: default-size-lc_paper.sh FAIL: default-size-system-papersize.sh FAIL: default-size-system-paperspecs.sh FAIL: default-size-user-paperspecs.sh FAIL: default-size-no-default-paper.sh PASS: unit-pt.sh PASS: unit-pt-equals.sh PASS: unit-mm.sh PASS: unit-in.sh PASS: unit-invalid.sh FAIL: all-sizes.sh PASS: zero-arguments.sh PASS: one-argument.sh PASS: two-arguments.sh FAIL: paperspecs-invalid.sh FAIL: no-home.sh PASS: paper-unknown.sh FAIL: bad-width.sh FAIL: bad-height.sh PASS: unknown-option.sh PASS: option-requires-argument.sh ============================================================================ Testsuite summary for libpaper 2.1.3 ============================================================================ # TOTAL: 23 # PASS: 13 # SKIP: 1 # XFAIL: 0 # FAIL: 9 # XPASS: 0 # ERROR: 0 ============================================================================
comment:11 follow-up: 12 Changed 8 months ago by ballapete (Peter "Pete" Dyballa)
The tests default-size-system-papersize
, default-size-system-paperspecs
, default-size-user-paperspecs
, default-size-no-default-paper
fail because a standard paper size is used, A4
, instead of system_papersize
, first_system_paperspecs
, first_user_paperspecs
, or paper: no default paper size is set
.
Changed 8 months ago by ballapete (Peter "Pete" Dyballa)
Attachment: | test-suite.log added |
---|
from PPC Tiger, Mac OS X 10.4.11, built with --disable-relocatable
comment:12 Changed 7 months ago by barracuda156
Replying to ballapete:
The tests
default-size-system-papersize
,default-size-system-paperspecs
,default-size-user-paperspecs
,default-size-no-default-paper
fail because a standard paper size is used,A4
, instead ofsystem_papersize
,first_system_paperspecs
,first_user_paperspecs
, orpaper: no default paper size is set
.
Could you submit a fix for that?
comment:13 Changed 7 months ago by barracuda156
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
this fixes it but it's very ugly: