Opened 2 years ago

Last modified 2 years ago

#65893 new defect

fluidsynth @2.2.8 fails to build - Problem with MIDIPacketNext(packet) macro

Reported by: RobK88 Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: lion Cc: RJVB (René Bertin), mojca (Mojca Miklavec)
Port: fluidsynth

Description

fluidsynth will not build on lion. see attached main.log

[ 21%] Building C object src/CMakeFiles/libfluidsynth-OBJ.dir/drivers/fluid_coremidi.c.o
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_fluidsynth/fluidsynth/work/build/src && /usr/bin/clang  -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_fluidsynth/fluidsynth/work/build -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_fluidsynth/fluidsynth/work/fluidsynth-2.2.8/src -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_fluidsynth/fluidsynth/work/fluidsynth-2.2.8/src/drivers -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_fluidsynth/fluidsynth/work/fluidsynth-2.2.8/src/synth -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_fluidsynth/fluidsynth/work/fluidsynth-2.2.8/src/rvoice -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_fluidsynth/fluidsynth/work/fluidsynth-2.2.8/src/midi -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_fluidsynth/fluidsynth/work/fluidsynth-2.2.8/src/utils -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_fluidsynth/fluidsynth/work/fluidsynth-2.2.8/src/sfloader -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_fluidsynth/fluidsynth/work/fluidsynth-2.2.8/src/bindings -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_fluidsynth/fluidsynth/work/fluidsynth-2.2.8/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_fluidsynth/fluidsynth/work/build/include -I/opt/local/include/SDL2 -I/opt/local/include/opus -isystem /opt/local/include/glib-2.0 -isystem /opt/local/lib/glib-2.0/include -pipe -Os -DNDEBUG -I/opt/local/include -Wall -W -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wno-unused-parameter -Wdeclaration-after-statement -Werror=implicit-function-declaration -Werror=incompatible-pointer-types -Wbad-function-cast -Wcast-align -arch x86_64 -mmacosx-version-min=10.7 -fPIC -fvisibility=hidden -std=gnu90 -MD -MT src/CMakeFiles/libfluidsynth-OBJ.dir/drivers/fluid_coremidi.c.o -MF CMakeFiles/libfluidsynth-OBJ.dir/drivers/fluid_coremidi.c.o.d -o CMakeFiles/libfluidsynth-OBJ.dir/drivers/fluid_coremidi.c.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_fluidsynth/fluidsynth/work/fluidsynth-2.2.8/src/drivers/fluid_coremidi.c
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_fluidsynth/fluidsynth/work/fluidsynth-2.2.8/src/drivers/fluid_coremidi.c:284:18: warning: cast from 'const Byte *' (aka 'const unsigned char *') to 'MIDIPacket *' (aka 'struct MIDIPacket *') increases required alignment from 1 to 4 [-Wcast-align]
        packet = MIDIPacketNext(packet);
                 ^~~~~~~~~~~~~~~~~~~~~~
/System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h:1980:30: note: expanded from macro 'MIDIPacketNext'
#define MIDIPacketNext(pkt)     ((MIDIPacket *)&(pkt)->data[(pkt)->length])
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_fluidsynth/fluidsynth/work/build'
make[1]: *** [src/CMakeFiles/libfluidsynth-OBJ.dir/all] Error 2
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_fluidsynth/fluidsynth/work/build'
make: *** [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_fluidsynth/fluidsynth/work/build'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_fluidsynth/fluidsynth/work/build" && /usr/bin/make -j4 -w all VERBOSE=ON 
Exit code: 2
Error: Failed to build fluidsynth: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_fluidsynth/fluidsynth/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port fluidsynth failed
bash-3.2$

Attachments (1)

main.log (144.4 KB) - added by RobK88 2 years ago.
main.log

Download all attachments as: .zip

Change History (6)

Changed 2 years ago by RobK88

Attachment: main.log added

main.log

comment:1 Changed 2 years ago by RobK88

Summary: fluidsynth fails to build - Problem with MIDIPacketNext(pkt) macrofluidsynth @2.2.8 fails to build - Problem with MIDIPacketNext(pkt) macro

comment:2 Changed 2 years ago by RobK88

Summary: fluidsynth @2.2.8 fails to build - Problem with MIDIPacketNext(pkt) macrofluidsynth @2.2.8 fails to build - Problem with MIDIPacketNext(packet) macro

comment:3 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

What you showed in the ticket description was only a warning. Warnings don't cause build failures; they're just warnings.

The real cause of the problem, from earlier in the log, was:

:info:build make[2]: *** read jobs pipe: Resource temporarily unavailable.  Stop.

That's weird. Try building again?

comment:4 Changed 2 years ago by RJVB (René Bertin)

I see you're running 10.7.5; how much RAM do you have, and how much free space on your boot drive?

I'm not expecting fluidsynth to be particularly expensive to build but the clang compiler can be *very* resource hungry. So if the build fails again with the same error you are apparently trying to use more memory than your computer can provide. In that case:

  • check how many applications you have running (close browser windows or simply quit them for the duration of the build)
  • do *not* do a port clean before trying again, so your build process continues where
  • add build.jobs=1 build.post_args=-wk to the port install (or port build) command. This will ensure that only a single file is built at a time, but also that the build will continue as far as possible, regardless of errors.

Personally I would also get ride of the -pipe argument to limit the number of concurrent build processes even more. (I have a lot of working experience with/on underdimensioned system and in my experience that makes builds run more smoothly on them. Then again, I have the impression that clang does not actually uses distinct processes for preprocessor, compiler and assembler.)

comment:5 Changed 2 years ago by RobK88

René -- Sorry for the delay. I just saw your post.

I closed all my applications and just ran sudo port install fluidsynth. fluidsynth was built and installed without any errors on my old Mac running Lion.

bash-3.2$ port installed fluidsynth
The following ports are currently installed:
  fluidsynth @2.3.0_0 (active)

Perhaps, I did not have enough memory to build it in the first place (as you suggested) or perhaps a bug was fixed in version 2.3.0_0 of fluidsynth.

In any event, you can close off this ticket now.

Note: See TracTickets for help on using tickets.