Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#57029 closed defect (fixed)

xorg-libXfont @1.5.4 does not build on PPC Tiger because strnlen is undefined

Reported by: ballapete (Peter "Pete" Dyballa) Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version: 2.5.3
Keywords: tiger Cc: pmetzger (Perry E. Metzger), kencu (Ken)
Port: xorg-libXfont

Description

libtool: compile:  /opt/local/bin/gcc-apple-4.2 -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I../include/X11/fonts -I/opt/local/include -Wall -Wpointer-arith -Wmissing-declarations -Wformat=2 -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wbad-function-cast -Wold-style-definition -Wdeclaration-after-statement -Wunused -Wuninitialized -Wshadow -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Werror=implicit -Werror=nonnull -Werror=init-self -Werror=main -Werror=missing-braces -Werror=sequence-point -Werror=return-type -Werror=trigraphs -Werror=write-strings -Werror=address -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -fno-strict-aliasing -pipe -Os -arch ppc -MT dummy.lo -MD -MP -MF .deps/dummy.Tpo -c dummy.c -o dummy.o >/dev/null 2>&1
mv -f .deps/dummy.Tpo .deps/dummy.Plo
/bin/sh ../libtool  --tag=CC   --mode=link /opt/local/bin/gcc-apple-4.2 -std=gnu99  -Wall -Wpointer-arith -Wmissing-declarations -Wformat=2 -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wbad-function-cast -Wold-style-definition -Wdeclaration-after-statement -Wunused -Wuninitialized -Wshadow -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Werror=implicit -Werror=nonnull -Werror=init-self -Werror=main -Werror=missing-braces -Werror=sequence-point -Werror=return-type -Werror=trigraphs -Werror=write-strings -Werror=address -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -fno-strict-aliasing -pipe -Os -arch ppc -version-number 1:4:1 -no-undefined -L/opt/local/lib -Wl,-headerpad_max_install_names -arch ppc -o libXfont.la -rpath /opt/local/lib dummy.lo fontfile/libfontfile.la FreeType/libft.la bitmap/libbitmap.la builtins/libbuiltins.la fc/libfc.la util/libutil.la stubs/libstubs.la -L/opt/local/lib -lfreetype -lz -lbz2 -lm -L/opt/local/lib -lfontenc 
libtool: link: /opt/local/bin/gcc-apple-4.2 -dynamiclib  -o .libs/libXfont.1.dylib  .libs/dummy.o   -Wl,-force_load,fontfile/.libs/libfontfile.a -Wl,-force_load,FreeType/.libs/libft.a -Wl,-force_load,bitmap/.libs/libbitmap.a -Wl,-force_load,builtins/.libs/libbuiltins.a -Wl,-force_load,fc/.libs/libfc.a -Wl,-force_load,util/.libs/libutil.a -Wl,-force_load,stubs/.libs/libstubs.a  -L/opt/local/lib /opt/local/lib/libfreetype.dylib -lz -lbz2 -lm /opt/local/lib/libfontenc.dylib  -Os -arch ppc -Wl,-headerpad_max_install_names -arch ppc   -install_name  /opt/local/lib/libXfont.1.dylib -compatibility_version 6 -current_version 6.1 -Wl,-single_module
Undefined symbols:
  "_strnlen", referenced from:
      _pcfGetProperties in libbitmap.a(pcfread.o)
      _pcfGetProperties in libbitmap.a(pcfread.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[3]: *** [libXfont.la] Error 1
make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_x11_xorg-libXfont/xorg-libXfont/work/libXfont-1.5.4/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_x11_xorg-libXfont/xorg-libXfont/work/libXfont-1.5.4/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_x11_xorg-libXfont/xorg-libXfont/work/libXfont-1.5.4'
make: *** [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_x11_xorg-libXfont/xorg-libXfont/work/libXfont-1.5.4'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_x11_xorg-libXfont/xorg-libXfont/work/libXfont-1.5.4" && /usr/bin/make -w all V=1 
Exit code: 2
Error: Failed to build xorg-libXfont: command execution failed

There is one difference in the build system from trying to solve #56922: GCC from second line was used while I am having GCC from first line active.

  apple-gcc42 @5666.3_15+gpl3 platform='darwin 8' archs='ppc' date='2015-07-10T13:06:16+0200'
  apple-gcc42 @5666.3_15 (active) platform='darwin 8' archs='ppc' date='2018-08-20T17:19:16+0200'
  apple-gcc42 @5666.3_15+bootstrap+gpl3 platform='darwin 8' archs='ppc' date='2018-08-21T01:36:13+0200'
  apple-gcc42 @5666.3_15+bootstrap platform='darwin 8' archs='ppc' date='2018-08-23T01:09:00+0200'

Later I'll to build with apple-gcc42 @5666.3_15+gpl3.

Attachments (1)

main.log (215.5 KB) - added by ballapete (Peter "Pete" Dyballa) 6 years ago.
Main.log from PPC Tiger build with apple-gcc42 @5666.3_15

Download all attachments as: .zip

Change History (12)

Changed 6 years ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.log added

Main.log from PPC Tiger build with apple-gcc42 @5666.3_15

comment:1 Changed 6 years ago by jmroot (Joshua Root)

Cc: pmetzger added; jeremyhu@… removed
Owner: set to jeremyhu
Status: newassigned

comment:2 Changed 6 years ago by pmetzger (Perry E. Metzger)

Not _strlen. What's missing is strnlen. Search the code for "strnlen" and see if there's a feature macro to configure it for machines where the function doesn't exit. If so, I'll consider rigging this up so that it sets that macro when building on tiger.

That said, I'm not willing to put a huge amount of time into fixing this, so if you want it to work, your help will be invaluable.

comment:3 Changed 6 years ago by pmetzger (Perry E. Metzger)

Summary: xorg-libXfont @1.5.4 does not build on PPC Tiger because _strlen is undefinedxorg-libXfont @1.5.4 does not build on PPC Tiger because strnlen is undefined

comment:4 Changed 6 years ago by pmetzger (Perry E. Metzger)

Another alternative would be for you to supply the thing with a strnlen implementation while linking. Perhaps kencu knows how to do this, he's our resident OS X archeologist.

comment:5 Changed 6 years ago by pmetzger (Perry E. Metzger)

Cc: kencu added

comment:6 Changed 6 years ago by kencu (Ken)

Yes - fixed this one last night locally with

PortGroup    snowleopard_fixes 1.0

will verify on other systems and push to master

comment:7 Changed 6 years ago by kencu (Ken)

Resolution: fixed
Status: assignedclosed

In 4a2b5000ca7245c9d131696a93aa69b0bda3bae6/macports-ports (master):

xorg-libXfont: fix missing strnlen

by using snowleopard_fixes PortGroup
requires header added to avoid errors in newer clangs
closes: #57029

comment:8 Changed 6 years ago by pmetzger (Perry E. Metzger)

Thanks, Ken!

comment:9 Changed 6 years ago by ballapete (Peter "Pete" Dyballa)

Built and installed here.

comment:10 Changed 6 years ago by ballapete (Peter "Pete" Dyballa)

xorg-libXfont @1.5.4_1 (active) platform='darwin 8' archs='ppc' date='2018-09-07T23:51:31+0200' also built without problems. I think it can be closed now.

comment:11 Changed 6 years ago by pmetzger (Perry E. Metzger)

The ticket has been closed for a couple of weeks.

Note: See TracTickets for help on using tickets.