[MacPorts] #65582: util-linux @2.38_1 does not build on PPC Tiger, Mac OS X 10.4.11, because of "Undefined symbols: "_timersub", referenced from: _print_stats in hardlink-hardlink.o"
MacPorts
noreply at macports.org
Tue Aug 2 20:27:07 UTC 2022
#65582: util-linux @2.38_1 does not build on PPC Tiger, Mac OS X 10.4.11, because
of "Undefined symbols: "_timersub", referenced from: _print_stats in
hardlink-hardlink.o"
-------------------------+--------------------
Reporter: ballapete | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.7.2
Resolution: | Keywords: tiger
Port: util-linux |
-------------------------+--------------------
Comment (by ballapete):
Building the port on the two different platforms shows quite a few
differences already in the beginning. On Tiger `-D__DARWIN_UNIX03` is
used, `configure` detects the functioning compiler switch `-Wformat-
security` – cause can be that on Leopard the system's `/usr/bin/gcc-4.2`
(version 4.2.1) gets used while on Tiger it's the augmented
`/opt/local/bin/gcc-apple-4.2` (version 4.2.4). Then the C header files
are included in different order:
{{{
Compiling on PPC Tiger (Mac OS X 10.4.11)
| Compiling on PPC Leoprad (Mac OS X 10.5.8)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -include config.h
-I./include | /usr/bin/gcc-4.2
-DHAVE_CONFIG_H -I. -include config.h -I./include
-DLOCALEDIR=\"/opt/local/share/locale\"
-D_PATH_RUNSTATEDIR=\"/opt/local/var/run\" |
-DLOCALEDIR=\"/opt/local/share/locale\"
-D_PATH_RUNSTATEDIR=\"/opt/local/var/run\"
-D_PATH_SYSCONFSTATICDIR=\"/opt/local/lib\" -I/opt/local/include
-D__DARWIN_UNIX03 |
-D_PATH_SYSCONFSTATICDIR=\"/opt/local/lib\" -I/opt/local/include
-I/opt/local/include/LegacySupport -fsigned-char -fno-common -Wall
-Wextra -Wformat-security |
-I/opt/local/include/LegacySupport -fsigned-char -fno-common -Wall -Wextra
-Wimplicit-function-declaration -Wmissing-declarations -Wmissing-
prototypes -Wnested-externs | -Wimplicit-function-
declaration -Wmissing-declarations -Wmissing-prototypes -Wnested-externs
-Wno-missing-field-initializers -Wpointer-arith -Wredundant-decls -Wsign-
compare -Wstrict-prototypes | -Wno-missing-field-initializers
-Wpointer-arith -Wredundant-decls -Wsign-compare -Wstrict-prototypes
-Wunused-parameter -Wunused-variable -Werror=sequence-point -pipe -Os -H
-I/opt/local/include/LegacySupport | -Wunused-parameter -Wunused-
variable -Werror=sequence-point -pipe -Os -H
-I/opt/local/include/LegacySupport
-arch ppc -MT misc-utils/hardlink-hardlink.o -MD -MP -MF misc-utils/.deps
/hardlink-hardlink.Tpo -c | -arch ppc -MT misc-utils
/hardlink-hardlink.o -MD -MP -MF misc-utils/.deps/hardlink-hardlink.Tpo -c
-o misc-utils/hardlink-hardlink.o `test -f 'misc-utils/hardlink.c' ||
echo './'`misc-utils/hardlink.c | -o misc-utils/hardlink-
hardlink.o `test -f 'misc-utils/hardlink.c' || echo './'`misc-
utils/hardlink.c
|
. /opt/local/include/LegacySupport/sys/types.h
|
.. /usr/include/sys/types.h
| . /usr/include/sys/types.h
... /usr/include/sys/appleapiopts.h
| .. /usr/include/sys/appleapiopts.h
... /usr/include/sys/cdefs.h
| .. /usr/include/sys/cdefs.h
... /usr/include/machine/types.h
| .. /usr/include/machine/types.h
.... /usr/include/ppc/types.h
| ... /usr/include/ppc/types.h
..... /usr/include/ppc/_types.h
| .... /usr/include/ppc/_types.h
... /usr/include/sys/_types.h
| .. /usr/include/sys/_types.h
.... /usr/include/machine/_types.h
| ... /usr/include/machine/_types.h
... /usr/include/machine/endian.h
| .. /usr/include/machine/endian.h
.... /usr/include/ppc/endian.h
| ... /usr/include/ppc/endian.h
| .... /usr/include/sys/_endian.h
| .. /usr/include/sys/_structs.h
. /opt/local/include/LegacySupport/sys/stat.h
| . /opt/local/include/LegacySupport/sys/stat.h
.. /opt/local/include/LegacySupport/MacportsLegacySupport.h
| .. /opt/local/include/LegacySupport/MacportsLegacySupport.h
.. /usr/include/sys/stat.h
| .. /usr/include/sys/stat.h
| ... /usr/include/sys/_structs.h
. /opt/local/include/LegacySupport/sys/time.h
| . /opt/local/include/LegacySupport/sys/time.h
.. /usr/include/sys/time.h
| .. /usr/include/sys/time.h
| ... /usr/include/sys/_structs.h
| ... /opt/local/include/LegacySupport/time.h
| .... /opt/local/include/LegacySupport/MacportsLegacySupport.h
| .... /usr/include/time.h
| ..... /usr/include/_types.h
| ..... /usr/include/_structs.h
| ...... /usr/include/sys/_structs.h
| ... /usr/include/sys/_select.h
. /usr/include/sys/resource.h
| . /usr/include/sys/resource.h
| .. /usr/include/sys/_structs.h
. /usr/include/fcntl.h
| . /usr/include/fcntl.h
.. /opt/local/include/LegacySupport/sys/fcntl.h
| .. /opt/local/include/LegacySupport/sys/fcntl.h
... /usr/include/sys/fcntl.h
| ... /usr/include/sys/fcntl.h
. /usr/include/ftw.h
| . /usr/include/ftw.h
. /usr/include/search.h
| . /usr/include/search.h
.. /usr/include/_types.h
|
. /usr/include/signal.h
| . /usr/include/signal.h
.. /usr/include/sys/signal.h
| .. /usr/include/sys/signal.h
... /usr/include/machine/signal.h
| ... /usr/include/machine/signal.h
.... /usr/include/ppc/signal.h
| .... /usr/include/ppc/signal.h
| ..... /usr/include/ppc/_structs.h
| ... /usr/include/sys/_structs.h
| .... /usr/include/machine/_structs.h
| ..... /usr/include/ppc/_structs.h
| ...... /usr/include/mach/ppc/_structs.h
. /usr/include/getopt.h
| . /usr/include/getopt.h
.. /opt/local/include/LegacySupport/unistd.h
| .. /opt/local/include/LegacySupport/unistd.h
... /opt/local/include/LegacySupport/MacportsLegacySupport.h
|
... /usr/include/unistd.h
| ... /usr/include/unistd.h
.... /opt/local/include/LegacySupport/sys/unistd.h
| .... /opt/local/include/LegacySupport/sys/unistd.h
..... /usr/include/sys/unistd.h
| ..... /usr/include/sys/unistd.h
..... /opt/local/lib/apple-gcc42/gcc/powerpc-apple-
darwin8/4.2.4/include/stdint.h | .....
/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include/stdint.h
| .... /usr/include/sys/select.h
| ..... /usr/include/sys/_structs.h
. /usr/include/ctype.h
| . /usr/include/ctype.h
.. /usr/include/runetype.h
| .. /usr/include/runetype.h
. /usr/include/sys/ioctl.h
| . /usr/include/sys/ioctl.h
.. /usr/include/sys/ttycom.h
| .. /usr/include/sys/ttycom.h
... /usr/include/sys/ioccom.h
| ... /usr/include/sys/ioccom.h
.. /usr/include/sys/filio.h
| .. /usr/include/sys/filio.h
.. /usr/include/sys/sockio.h
| .. /usr/include/sys/sockio.h
. ./include/nls.h
| . ./include/nls.h
.. /usr/include/locale.h
| .. /usr/include/locale.h
... /usr/include/_locale.h
| ... /usr/include/_locale.h
.. /opt/local/include/libintl.h
| .. /opt/local/include/libintl.h
... /usr/include/xlocale.h
| ... /usr/include/xlocale.h
.... /usr/include/_xlocale.h
| .... /usr/include/_xlocale.h
.... /usr/include/xlocale/_ctype.h
| .... /usr/include/xlocale/_ctype.h
| .... /usr/include/xlocale/_time.h
.. /usr/include/langinfo.h
| .. /usr/include/langinfo.h
... /usr/include/xlocale/_langinfo.h
| ... /usr/include/xlocale/_langinfo.h
. ./include/c.h
| . ./include/c.h
.. /opt/local/lib/apple-gcc42/gcc/powerpc-apple-
darwin8/4.2.4/include/limits.h | ..
/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include/limits.h
... /opt/local/lib/apple-gcc42/gcc/powerpc-apple-
darwin8/4.2.4/include/syslimits.h | ...
/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include/syslimits.h
... /usr/include/limits.h
| ... /usr/include/limits.h
.... /usr/include/machine/limits.h
| .... /usr/include/machine/limits.h
..... /usr/include/ppc/limits.h
| ..... /usr/include/ppc/limits.h
...... /usr/include/ppc/_limits.h
| ...... /usr/include/ppc/_limits.h
.... /usr/include/sys/syslimits.h
| .... /usr/include/sys/syslimits.h
.. /opt/local/lib/apple-gcc42/gcc/powerpc-apple-
darwin8/4.2.4/include/stddef.h | ..
/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include/stddef.h
.. /opt/local/include/LegacySupport/stdio.h
| .. /opt/local/include/LegacySupport/stdio.h
... /usr/include/stdio.h
| ... /usr/include/stdio.h
.... /usr/include/xlocale/_stdio.h
| .... /usr/include/xlocale/_stdio.h
.. /opt/local/lib/apple-gcc42/gcc/powerpc-apple-
darwin8/4.2.4/include/stdarg.h | ..
/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include/stdarg.h
.. /opt/local/include/LegacySupport/stdlib.h
| .. /opt/local/include/LegacySupport/stdlib.h
... /usr/include/stdlib.h
| ... /usr/include/stdlib.h
| .... /usr/include/available.h
.... /usr/include/sys/wait.h
| .... /usr/include/sys/wait.h
| .... /usr/include/alloca.h
.... /usr/include/xlocale/_stdlib.h
| .... /usr/include/xlocale/_stdlib.h
.. /opt/local/include/LegacySupport/string.h
| .. /opt/local/include/LegacySupport/string.h
... /usr/include/string.h
| ... /usr/include/string.h
.... /usr/include/xlocale/_string.h
| .... /usr/include/xlocale/_string.h
.. /usr/include/errno.h
| .. /usr/include/errno.h
... /usr/include/sys/errno.h
| ... /usr/include/sys/errno.h
.. /opt/local/include/LegacySupport/sys/types.h
|
.. /usr/include/grp.h
| .. /usr/include/grp.h
.. /usr/include/assert.h
| .. /usr/include/assert.h
.. /usr/include/err.h
| .. /usr/include/err.h
.. /usr/include/fcntl.h
| .. /usr/include/fcntl.h
.. /opt/local/include/LegacySupport/time.h
|
... /usr/include/time.h
|
.... /usr/include/machine/_limits.h
|
.... /usr/include/xlocale/_time.h
|
. ./include/xalloc.h
| . ./include/xalloc.h
.. ./include/c.h
| .. ./include/c.h
In file included from misc-utils/hardlink.c:51:
|
./include/xalloc.h: In function 'xasprintf':
|
./include/xalloc.h:104: warning: implicit declaration of function
'vasprintf' |
./include/xalloc.h:104: warning: nested extern declaration of 'vasprintf'
|
. ./include/strutils.h
| . ./include/strutils.h
.. /usr/include/inttypes.h
| .. /usr/include/inttypes.h
... /usr/include/xlocale/_inttypes.h
| ... /usr/include/xlocale/_inttypes.h
.. /opt/local/include/LegacySupport/sys/types.h
|
.. /usr/include/errno.h
| .. /usr/include/errno.h
In file included from misc-utils/hardlink.c:52:
|
./include/strutils.h: In function 'startswith_no_case':
|
./include/strutils.h:242: warning: implicit declaration of function
'strncasecmp' |
. ./include/monotonic.h
| . ./include/monotonic.h
. ./include/optutils.h
| . ./include/optutils.h
.. /usr/include/assert.h
| .. /usr/include/assert.h
.. ./include/nls.h
| .. ./include/nls.h
.. ./include/cctype.h
| .. ./include/cctype.h
. ./include/fileeq.h
| . ./include/fileeq.h
.. /opt/local/lib/apple-gcc42/gcc/powerpc-apple-
darwin8/4.2.4/include/stdbool.h | ..
/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include/stdbool.h
. ./include/statfs_magic.h
| . ./include/statfs_magic.h
. /usr/include/regex.h
| . /usr/include/regex.h
misc-utils/hardlink.c: In function 'print_stats':
|
misc-utils/hardlink.c:343: warning: implicit declaration of function
'timersub' |
misc-utils/hardlink.c:343: warning: nested extern declaration of
'timersub' |
misc-utils/hardlink.c: In function 'file_xattrs_equal':
|
misc-utils/hardlink.c:580: warning: unused parameter 'a'
|
misc-utils/hardlink.c:580: warning: unused parameter 'b'
|
misc-utils/hardlink.c: In function 'inserter':
|
misc-utils/hardlink.c:816: warning: format '%ld' expects type 'long int',
but argument 4 has type 'dev_t' |
misc-utils/hardlink.c:816: warning: format '%ld' expects type 'long int',
but argument 5 has type 'ino_t' |
| misc-utils/hardlink.c: In function ‘file_xattrs_equal’:
| misc-utils/hardlink.c:580: warning: unused parameter ‘a’
| misc-utils/hardlink.c:580: warning: unused parameter ‘b’
| misc-utils/hardlink.c: In function ‘inserter’:
| misc-utils/hardlink.c:816: warning: format ‘%ld’ expects type ‘long
int’, but argument 4 has type ‘dev_t’
| misc-utils/hardlink.c:816: warning: format ‘%ld’ expects type ‘long
int’, but argument 5 has type ‘__darwin_ino64_t’
mv -f misc-utils/.deps/hardlink-hardlink.Tpo misc-utils/.deps/hardlink-
hardlink.Po | mv -f misc-utils/.deps
/hardlink-hardlink.Tpo misc-utils/.deps/hardlink-hardlink.Po
======================================================================================================================================================================================================================================
}}}
On Tiger the macro definition is observed as that of function – this seems
to be the main cause. To determine this "change" I think the pre-compiled
output would be useful…
BTW, I added the line `configure.cflags-append -H` to `Portfile` in order
to see which header file are included. The pre-compilation will be
performed manually.
--
Ticket URL: <https://trac.macports.org/ticket/65582#comment:7>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list