Opened 6 years ago

Closed 6 years ago

#57544 closed defect (fixed)

zstd @1.3.4: fails to compile for i386 on 10.6

Reported by: LetterRip Owned by: seanfarley (Sean Farley)
Priority: Normal Milestone:
Component: ports Version: 2.5.4
Keywords: haspatch Cc: ryandesign (Ryan Carsten Schmidt)
Port: zstd

Description (last modified by LetterRip)

On OS X 10.6.8 32 bit, when trying to install py27-pandas (and py35-pandas)

/usr/bin/make -j2 -w allmost
make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_archivers_zstd/zstd/work/zstd-1.3.4'
/usr/bin/make -C lib all
make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_archivers_zstd/zstd/work/zstd-1.3.4/lib'
cc -O3 -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wstrict-aliasing=1 -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wundef -Wpointer-arith -Wformat-security -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings -Wredundant-decls  -I. -I./common -DXXH_NAMESPACE=ZSTD_ -I./legacy -DZSTD_LEGACY_SUPPORT=4  -c -o compress/zstd_compress.o compress/zstd_compress.c
cc -O3 -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wstrict-aliasing=1 -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wundef -Wpointer-arith -Wformat-security -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings -Wredundant-decls  -I. -I./common -DXXH_NAMESPACE=ZSTD_ -I./legacy -DZSTD_LEGACY_SUPPORT=4  -c -o compress/zstd_fast.o compress/zstd_fast.c
In file included from compress/zstd_compress.c:24:
./common/cpu.h: In function ‘ZSTD_cpuid’:
./common/cpu.h:76: error: expected string literal before ‘)’ token
make[1]: *** [compress/zstd_compress.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_archivers_zstd/zstd/work/zstd-1.3.4/lib'
make: *** [allzstd] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_archivers_zstd/zstd/work/zstd-1.3.4'

Change History (9)

comment:1 Changed 6 years ago by LetterRip

Description: modified (diff)
Keywords: zstd added

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

Keywords: zstd removed
Port: zstd added
Summary: zstd@1.3.4: fails to compilezstd @1.3.4: fails to compile for i386 on 10.6

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

On 10.6.8, clang-3.4 got past the inline assembly, but wouldn't build it +universal

make[1]: Leaving directory `/opt/local/var/macports/build/_opt_SnowLeopardPorts_archivers_zstd/zstd/work/zstd-1.3.4/contrib/gen_html'
make[1]: Entering directory `/opt/local/var/macports/build/_opt_SnowLeopardPorts_archivers_zstd/zstd/work/zstd-1.3.4/lib'
make[1]: Nothing to be done for `lib'.
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_SnowLeopardPorts_archivers_zstd/zstd/work/zstd-1.3.4/lib'
/usr/bin/make -C contrib/pzstd all
make[1]: Entering directory `/opt/local/var/macports/build/_opt_SnowLeopardPorts_archivers_zstd/zstd/work/zstd-1.3.4/contrib/pzstd'
/opt/local/bin/clang++-mp-3.4 -arch x86_64 -arch i386 -D__STDC_FORMAT_MACROS -MMD -MP -MF main.Td   -I../../lib -I../../lib/common -I../../programs -I. -DNDEBUG -O3 -Wall -Wextra -pedantic  -std=c++11 -c main.cpp  -o main.o
In file included from main.cpp:9:
./ErrorHolder.h:11:10: fatal error: 'atomic' file not found
#include <atomic>
         ^
1 error generated.

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

It wants c++11, so we need to configure the PG for that.

It is also not passing the -stdlib=NNN so that needs to be fixed as well.

With all this work to be done, we might as well update it first to 1.3.7, and then start fixing the broken bits after that.

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

It also opportunistically links to lz4 if it is installed.

comment:6 Changed 6 years ago by dbevans (David B. Evans)

@kencu, since you have a handle on what needs to be done, maybe a PR would be appropriate here.

comment:7 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign added

Riccardo Mottola provided the simple patch that fixes this on the mailing list.

The request to update to 1.3.7 is another ticket.

C++11 is only used by pzstd which does not get built for me; not sure why it's getting built for you.

The opportunistic linking against lz4 and others is tracked in another ticket.

I am working on the PRs now.

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

Keywords: haspatch added

comment:9 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

In 815d231e23039f491eaea1b7c52d20bb7f7ede5a/macports-ports (master):

zstd: Update to 1.3.7

Closes: #57597

Add dependencies on lz4, xz, and zlib, which were previously linked
opportunistically.

Closes: #56645

Fix detection of pthread, lz4, xz, and zlib when building universal.

Closes: #56646

Add a patch to fix compilation on i386.

Closes: #57544

Enable tests.

Note: See TracTickets for help on using tickets.