waddlesplash / QMidi

Qt library for MIDI output & MIDI file I/O.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fails to build on FreeBSD 13.0-RELEASE

probonopd opened this issue · comments

Fails to build on FreeBSD 13.0-RELEASE:

FreeBSD% LANG=C cmake ..   
-- Configuring done
CMake Error: AUTOMOC for target QMidi: Could not find moc executable target Qt5::moc
CMake Generate step failed.  Build files cannot be regenerated correctly.
LANG=C 

Why are you setting this?

Anyway, the problem is clearly specified: MOC couldn't be found by the AUTOMOC tool. That seems to be mostly likely an issue on the system?

Why are you setting this?

To get Englsh error messages.

Should this be working?

FreeBSD% moc
zsh: command not found: moc

I do have /usr/local/lib/qt5/bin/moc.

try

export PATH=/usr/local/lib/qt5/bin:$PATH
cmake ..

Unfortunately that's not it. Same error message. I can build other Qt projects just fine on this machine. This is what is puzzling me.

Another project:

FreeBSD% truss cmake .. 2>&1 | grep moc
access("/usr/local/lib/qt5/bin/moc",R_OK)        = 0 (0x0)
access("/usr/local/lib/qt5/bin/moc",R_OK)        = 0 (0x0)
fstatat(AT_FDCWD,"/usr/local/lib/qt5/bin/moc",{ mode=-rwxr-xr-x ,inode=699497,size=910800,blksize=131072 },0x0) = 0 (0x0)

This project:

FreeBSD% truss cmake .. 2>&1 | grep moc

CMake Error: AUTOMOC for target QMidi: Could not find moc executable target Qt5::mocwrite(2,"CMake Error: AUTOMOC for target "...,84) = 84 (0x54)

Maybe it's something in the CMake files.

Looked into it - It seems to correlate with https://github.com/waddlesplash/QMidi/blob/master/CMakeLists.txt#L11.
I reproduced the problem with the version inside the repo on msvc2022

When I uncomment the line linked above, everything builds just fine.

Seems like ae96b47 added this line commented (?) as part of #30
the line is needed tho (compare #30 (comment))