Opened 2 months ago

Last modified 2 months ago

#57294 assigned defect

libkdegames @4.14.3: 'al.h' file not found

Reported by: rlhamil Owned by: NicosPavlov
Priority: Normal Milestone:
Component: ports Version: 2.5.4
Keywords: mojave Cc:
Port: libkdegames


include file <al.h> isn't found. openal-soft is installed (regular openal won't build, there was already a ticket for that), so why isn't it finding it?

Attachments (1)

main.log-libkdegames.txt (468.2 KB) - added by rlhamil 2 months ago.

Download all attachments as: .zip

Change History (9)

Changed 2 months ago by rlhamil

Attachment: main.log-libkdegames.txt added

comment:1 Changed 2 months ago by ryandesign (Ryan Schmidt)

Keywords: mojave added; mojaveProblems removed
Owner: set to NicosPavlov
Status: newassigned
Summary: libkdegames build fails on mojavelibkdegames @4.14.3: 'al.h' file not found

libkdegames doesn't declare a dependency on openal or openal-soft, so either it shouldn't be using them, or it needs to declare a dependency one of them and have this build failure fixed.

comment:2 Changed 2 months ago by ryandesign (Ryan Schmidt)

Port: libkdegames added; port removed

comment:3 Changed 2 months ago by stanimura

I had the same error, but, in my case, it seems to solve on Mojave without openal-soft/openal as adding the following in Portfile.

pre-configure {
    configure.cppflags-append "-I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Versions/A/Headers"
    configure.cflags-append "-I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Versions/A/Headers"
    configure.cxxflags-append "-I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Versions/A/Headers"

The missing al.h is possibly located in


However, I am not sure if the al.h is right al.h.

comment:4 Changed 2 months ago by rlhamil

Wow, you may have the answer there! Not only did libkdegames build, but with that in place, all the ports brought in by kdegames4 built just fine.

While I doubt those options would hurt anything even if the directory did not exist on an older OS version, can those directives be made conditional on the OS version (e.g. os.version 18.0.0 or later)? If possible, that would IMO be highest confidence that no older versions where it works now would be affected.

comment:5 Changed 2 months ago by kencu (Ken)

That's not the right fix, but it's a good clue as to what the right fix should be.

Does this port not use -framework OpenAL.framework anywhere?


comment:6 Changed 2 months ago by NicosPavlov

It seems that builds on previous versions have been detecting the framework automatically. I don't have Mojave installed to test the issue, but on High Sierra, the configure stage shows that it is properly found:

-- Found automoc4: /opt/local/bin/automoc4
-- Found OpenAL: /System/Library/Frameworks/OpenAL.framework  
-- Found SndFile: /opt/local/lib/libsndfile.dylib  
-- The following external packages were located on your system.
-- This installation will have the extra features provided by these packages.
   * OpenAL - OpenAL (Open Audio Library) is a free software cross-platform audio API.
   * SndFile - libsndfile is a C library written by Erik de Castro Lopo for reading and writing audio files.
   * KDeclarative - KDeclarative is a KDE library for KDE specific QML support.

comment:7 Changed 2 months ago by rlhamil

On Mojave with unmodified Portfile, it says the following, except that it's NOT finding the right thing because the al.h header is NOT there. So it fails later on.

-- Found OpenAL: /System/Library/Frameworks/OpenAL.framework  
-- Found SndFile: /opt/local/lib/libsndfile.dylib  
-- Checking libsndfile capabilities
-- INCLUDES FOR SOUND:  /System/Library/Frameworks/OpenAL.framework/Headers /opt/local/include
-- LIBRARIES FOR SOUND: /System/Library/Frameworks/OpenAL.framework /opt/local/lib/libsndfile.dylib

If you need -framework OpenAL.framework, then I guess you need a -F /path/to/frameworks_directory option too, but if I try a trivial

clang -v -F/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks  -framework OpenAL.framework

it fails with can't find framework long before it notices that I didn't even give it anything to compile or link. :-) So there's some missing magic still needed, I suppose.

comment:8 Changed 2 months ago by kencu (Ken)

Getting there. You should not need to pass in the System frameworks directory.

Maybe this port is having issues with the -isysroot thing. Do you have the command-line tools installed? If not, this port might need some fixing to use the SDK rather than "/".

Note: See TracTickets for help on using tickets.