Opened 15 months ago
Last modified 3 months ago
#68040 new defect
DeaDBeeF @1.9.5: fatal error: 'wavpack.h' file not found
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.1 |
Keywords: | Cc: | barracuda156 | |
Port: | DeaDBeeF |
Description
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_multimedia_DeaDBeeF/DeaDBeeF/work/deadbeef-1.9.5/plugins/wavpack/wavpack.c:35:10: fatal error: 'wavpack.h' file not found #include <wavpack.h> ^~~~~~~~~~~ 1 error generated.
Change History (9)
comment:1 follow-up: 4 Changed 3 months ago by barracuda156
comment:2 Changed 3 months ago by barracuda156
Replying to ryandesign:
While it is supposed to build on 10.13–10.14 with Xcode, it should be considered to switch it to autotools, that will perhaps resolve these errors, and we can have it working on < 10.13. See #70602
comment:3 Changed 3 months ago by barracuda156
Cc: | barracuda156 added |
---|
comment:4 Changed 3 months ago by ryandesign (Ryan Carsten Schmidt)
wavpack.h is part of the version of wavpack bundled with DeaDBeeF. I believe the problem is that the include path is not specified correctly. On the failing macOS 10.14 build the flag is given to the compiler as:
-I\"/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_multimedia_DeaDBeeF/DeaDBeeF/work/deadbeef-1.9.5/osx/deps/WavPack-5.1.0/include\"
Those escaped quotation marks should not be there. On a successful macOS 12 build the quotes aren't there.
I believe the cause is that these quotation marks are specified in the Xcode project, for example:
That's just one example; there are over 100 lines in the project file with this mistake. Presumably newer Xcode versions strip them out while older Xcodes don't. They should probably be removed from the Xcode project file, e.g.
sed -E -i.orig 's/"\\"(.*)\\""/"\1"/' work/deadbeef-1.9.5/osx/deadbeef.xcodeproj/project.pbxproj
After this change it still builds for me on macOS 12 but I haven't tested on 10.14.
comment:5 Changed 3 months ago by ryandesign (Ryan Carsten Schmidt)
comment:6 follow-up: 8 Changed 3 months ago by ryandesign (Ryan Carsten Schmidt)
With that change, the next problem on 10.14 is:
osx/deps/flac-1.3.0/src/libFLAC/format.c:47:45: error: expected expression FLAC_API const char *FLAC__VERSION_STRING = VERSION; ^ In file included from <built-in>:364: <command line>:2:17: note: expanded from here #define VERSION \"0.0.0\" ^ osx/deps/flac-1.3.0/src/libFLAC/format.c:53:64: error: expected ';' after top level declarator FLAC_API const char *FLAC__VENDOR_STRING = "reference libFLAC " VERSION " 20130526"; ^ ;
This appears to be because the Xcode project defines VERSION
this way, with embedded escaped backslashes which get passed on into the header file where they cause the syntax error:
"VERSION=\\\"0.0.0\\\"",
So I tried adding the regex s/\\\\\\"/\\"/g
to the reinplace
. Unfortunately that causes the build to fail on macOS 12 with:
osx/deps/flac-1.3.0/src/libFLAC/format.c:47:45: error: invalid suffix '.0' on floating constant FLAC_API const char *FLAC__VERSION_STRING = VERSION; ^ In file included from <built-in>:373: <command line>:2:20: note: expanded from here #define VERSION 0.0.0 ^ osx/deps/flac-1.3.0/src/libFLAC/format.c:53:64: error: expected ';' after top level declarator FLAC_API const char *FLAC__VENDOR_STRING = "reference libFLAC " VERSION " 20130526"; ^ ;
So new Xcode needs the escaped backslashes and old Xcode forbids them. I don't understand Xcode.
comment:7 Changed 3 months ago by ryandesign (Ryan Carsten Schmidt)
comment:8 Changed 3 months ago by barracuda156
Replying to ryandesign:
So new Xcode needs the escaped backslashes and old Xcode forbids them. I don't understand Xcode.
Yeah, what a mess.
- S. Turned out that the whole code uses blocks even in GTK (!) part, so my optimism was unjustified: it is perhaps feasible to hack the build for gcc by stripping out the GUI, but hardly worth the effort.
Judging from buildbots, still broken on 10.14 down (though why a non-OS header availability is conditional on OS version?).