Opened 2 years ago

Closed 22 months ago

Last modified 22 months ago

#65305 closed defect (fixed)

libdeflate @1.11 does not build on PPC Mac OS X 10.4.11, Tiger, because: Makefile:130: *** only one `else' per conditional. Stop.

Reported by: ballapete (Peter "Pete" Dyballa) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: tiger Cc: dankamongmen (nick black), herbygillot (Herby Gillot)
Port: libdeflate

Description

make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_archivers_libdeflate/libdeflate/work/libdeflate-1.11'
Makefile:123: Extraneous text after `else' directive
Makefile:130: Extraneous text after `else' directive
Makefile:130: *** only one `else' per conditional.  Stop.

Attachments (1)

main.log (24.8 KB) - added by ballapete (Peter "Pete" Dyballa) 2 years ago.
Main.log from PPC Tiger

Download all attachments as: .zip

Change History (11)

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

Attachment: main.log added

Main.log from PPC Tiger

comment:1 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)

Using GNU make instead of Apple's make lets the compilation start.

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

The build stops early:

cc -o libdeflate.so.0  -O2 -fomit-frame-pointer -std=c99 -I. -Wall -Wundef        -fvisibility=hidden -D_ANSI_SOURCE \
	-Wl,-soname=libdeflate.so.0 -shared lib/deflate_decompress.shlib.o lib/utils.shlib.o lib/arm/cpu_features.shlib.o lib/x86/cpu_features.shlib.o lib/deflate_compress.shlib.o lib/adler32.shlib.o lib/zlib_decompress.shlib.o lib/zlib_compress.shlib.o lib/crc32.shlib.o lib/gzip_decompress.shlib.o lib/gzip_compress.shlib.o
powerpc-apple-darwin8-gcc-4.0.1: unrecognized option '-shared'
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: unknown flag: -soname=libdeflate.so.0
collect2: ld returned 1 exit status
gmake: *** [Makefile:245: libdeflate.so.0] Fehler 1
CC="cc" CFLAGS="-O2 -fomit-frame-pointer -std=c99 -I. -Wall -Wundef        -D_POSIX_C_SOURCE=200809L -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H" scripts/detect.sh > programs/config.h
scripts/detect.sh: line 16: /dev/null: Operation not supported
scripts/detect.sh: line 16: /dev/null: Operation not supported
scripts/detect.sh: line 16: /dev/null: Operation not supported
scripts/detect.sh: line 16: /dev/null: Operation not supported
scripts/detect.sh: line 16: /dev/null: Operation not supported
scripts/detect.sh: line 16: /dev/null: Operation not supported
scripts/detect.sh: line 16: /dev/null: Operation not supported

comment:3 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)

This is quite interesting: /dev/null was deleted each time I invoked port -vd install libdeflate (Portfile is patched to use gmake instead of make.) Invoking port -vd build libdeflate produces no error or warning. Invoking now port -vd install libdeflate simply installs the software without fault. Trying to install the software in one step leads to the loss of /dev/null and the reported build failures!

I tried this all three times now.

comment:4 Changed 2 years ago by kencu (Ken)

I’m surprised anything builds with gcc 4.0.1

this port needs to be UsingTheRightCompiler.

comment:5 in reply to:  3 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to ballapete:

Using GNU make instead of Apple's make lets the compilation start.

Yes, using gmake in a platform darwin 8 block is a common fix used for Tiger. Note that "Apple's make" is simply GNU make 3.80 on Tiger; GNU make 3.81 introduced changes which many build system rely on.

Replying to ballapete:

powerpc-apple-darwin8-gcc-4.0.1: unrecognized option '-shared'
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: unknown flag: -soname=libdeflate.so.0

Sure, -shared should be -dynamiclib on macOS (newer macOS versions recognize -shared as a synonym for -dynamiclib but Tiger doesn't) and -soname should be -install_name, along with specifying a macOS-style dynamic library path rather than a Linux-style shared object name.

Replying to ballapete:

This is quite interesting: /dev/null was deleted each time I invoked port -vd install libdeflate

This may be because of:

scripts/detect.sh: line 16: /dev/null: Operation not supported

or maybe some other use of /dev/null in the build system. I'm envisioning somewhere where /dev/null is used as the output of a compilation or something (with a flag like -o /dev/null). The fix would be to direct the output to a real file somewhere in the work directory, which will then be deleted along with the rest of the work directory when the port is installed.

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

Using gmake seems to fix the problems with -shared and -soname. I really only included in Portfile a clause that makes gmake the make for the build and install process (steps) and did not receive complaints – except from scripts/detect.sh when I tried the "combined" process of port install. And of course GCC 4.2 was used for compilation!

In case libdeflate will be upgraded to support Tiger and Leopard correctly I can perform some more manual testing why and when /dev/null gets deleted.

comment:7 Changed 2 years ago by herbygillot (Herby Gillot)

In 51547eb8e918378d05238c0b03919b11bcd89d35/macports-ports (master):

libdeflate: use gmake instead of make

See: #65305

comment:8 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: herbygillot added; herby.gillot@… removed

The gmake port is only needed on Darwin 8. On Darwin 9 and later, the make provided by Xcode/CLT is new enough. Increasing the revision to force everyone to rebuild the port is unnecessary.

comment:9 Changed 22 months ago by kencu (Ken)

Resolution: fixed
Status: newclosed

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

someone might open a new ticket about gmake being always used by libdeflate, but this issue, the build failure on Tiger, is closed.

Note: See TracTickets for help on using tickets.