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

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

/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 Changed 3 months ago by barracuda156

Judging from buildbots, still broken on 10.14 down (though why a non-OS header availability is conditional on OS version?).

comment:2 in reply to:  description 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 in reply to:  1 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:

https://github.com/DeaDBeeF-Player/deadbeef/blob/a50e3a54261abcfcd8a4e627edc3a8b94ace6aff/osx/deadbeef.xcodeproj/project.pbxproj#L22862

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)

In 0b24ac1d2ea5885c9c501c8e60dc687387304092/macports-ports (master):

DeaDBeeF: Remove extraneous quotes in Xcode project file

See: #68040

comment:6 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)

In 03f31568161d60427d322feb24b9d0c5d8d552d5/macports-ports (master):

DeaDBeeF: Remove extraneous quotes in Xcode project file

See: #68040

comment:8 in reply to:  6 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.

  1. 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.

comment:9 Changed 3 months ago by ryandesign (Ryan Carsten Schmidt)

In 8953d5c94fd765bd39834d627da98360cf632d5e/macports-ports (master):

DeaDBeeF: Remove attempts to fix Xcode < 11 builds

See: #68040

Note: See TracTickets for help on using tickets.