Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#64969 closed defect (fixed)

py310-lz4: fatal error: 'lz4.h' file not found

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: reneeotten (Renee Otten)
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: Cc:
Port: py-lz4

Description

https://build.macports.org/builders/ports-10.6_x86_64-builder/builds/99295/steps/install-port/logs/stdio

fatal error: 'lz4.h' file not found
#include <lz4.h>
         ^

Looks like -I/opt/local/include is missing in the compile line which suggests this build system is not using CPPFLAGS like it should. I also see -O3 in the compile line (whereas MacPorts optimization flags should be -Os by default) and I do not see any -arch flags (which should be there) suggesting this build system isn't using CFLAGS either.

Change History (7)

comment:1 Changed 2 years ago by reneeotten (Renee Otten)

Owner: set to reneeotten
Resolution: fixed
Status: newclosed

In ec756621c0c1f621d50ef3cc822c878d730cc87a/macports-ports (master):

py-lz4: update to 4.0.0

Closes: #64969

comment:2 Changed 2 years ago by reneeotten (Renee Otten)

Resolution: fixed
Status: closedreopened

Hhm... it still fails on 10.6 with the same error. Of course there is no strict requirement to support these old systems, but perhaps this can be fixed. The build uses pkgconfig to get the required include directories for liblz4 and such, and will not use -O3 if liblz4 is found. I verified that this all works correctly on 10.15 when I updated the port, but it appears not to work properly on 10.6.

I don't have a system with such an old OS, but if someone wants to try and help out please try to install the port sudo port install py310-lz4, which presumably will fail. Then please post the output of:

python3.10 -c "import pkgconfig; print(pkgconfig.exists('liblz4')) ; print(pkgconfig.libs('liblz4')) ; print(pkgconfig.cflags('liblz4'))"

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

It's marked as noarch despite building extension modules. That can't be helping.

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

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

Resolution: fixed
Status: reopenedclosed

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

FTR, on 10.6:

% python3.10 -c "import pkgconfig; print(pkgconfig.exists('liblz4')) ; print(pkgconfig.libs('liblz4')) ; print(pkgconfig.cflags('liblz4'))"
True
-L/opt/local/lib -llz4
-I/opt/local/include

comment:7 in reply to:  3 Changed 2 years ago by reneeotten (Renee Otten)

Replying to jmroot:

It's marked as noarch despite building extension modules. That can't be helping.

Ah, good point - I should have noticed that 😉. Ot seems to build fine now after you corrected this, thanks!

Note: See TracTickets for help on using tickets.