[MacPorts] #70305: linhpsdr does not pass MacPorts cflags, which breaks the build

MacPorts noreply at macports.org
Fri Jun 28 05:43:13 UTC 2024


#70305: linhpsdr does not pass MacPorts cflags, which breaks the build
--------------------------+----------------------
 Reporter:  barracuda156  |      Owner:  ra1nb0w
     Type:  defect        |     Status:  assigned
 Priority:  Normal        |  Milestone:
Component:  ports         |    Version:  2.9.3
 Keywords:                |       Port:  linhpsdr
--------------------------+----------------------
 The portfile makes one think it should work, but it does not, flags are
 ignored. Also, it requires `-std=c99` passed explicitly. (And specifying
 it in the portfile does not work, since flags are not respected by the
 build.)

 {{{
 --->  Building linhpsdr
 Executing:  cd
 "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_science_linhpsdr/linhpsdr/work
 /linhpsdr-02361708dbdd1a1401a492af71f066c870a6aad3" && /usr/bin/make -j6
 -w all -f Makefile.mac SOAPYSDR_INCLUDE=SOAPYSDR CFLAGS="-Os -std=c99
 -arch ppc" LDFLAGS="-Wl,-headerpad_max_install_names -L/opt/local/lib
 -lMacportsLegacySupport -arch ppc"
 fatal: not a git repository (or any of the parent directories): .git
 fatal: not a git repository (or any of the parent directories): .git
 make: Entering directory
 `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_science_linhpsdr/linhpsdr/work
 /linhpsdr-02361708dbdd1a1401a492af71f066c870a6aad3'
 rm -f version.o
 /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_science_linhpsdr/linhpsdr/work/compwrap/cc/usr/bin/gcc-4.2
 -Wno-deprecated-declarations -D SOUNDIO -D GIT_DATE='""' -D
 GIT_VERSION='""' -D MIDI -D SOAPYSDR  -O3 -g -D MIDI `pkg-config --cflags
 gtk+-3.0`   -c -o main.o main.c
 /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_science_linhpsdr/linhpsdr/work/compwrap/cc/usr/bin/gcc-4.2
 -Wno-deprecated-declarations -D SOUNDIO -D GIT_DATE='""' -D
 GIT_VERSION='""' -D MIDI -D SOAPYSDR  -O3 -g -D MIDI `pkg-config --cflags
 gtk+-3.0`   -c -o audio.o audio.c
 /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_science_linhpsdr/linhpsdr/work/compwrap/cc/usr/bin/gcc-4.2
 -Wno-deprecated-declarations -D SOUNDIO -D GIT_DATE='""' -D
 GIT_VERSION='""' -D MIDI -D SOAPYSDR  -O3 -g -D MIDI `pkg-config --cflags
 gtk+-3.0`   -c -o version.o version.c
 /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_science_linhpsdr/linhpsdr/work/compwrap/cc/usr/bin/gcc-4.2
 -Wno-deprecated-declarations -D SOUNDIO -D GIT_DATE='""' -D
 GIT_VERSION='""' -D MIDI -D SOAPYSDR  -O3 -g -D MIDI `pkg-config --cflags
 gtk+-3.0`   -c -o discovered.o discovered.c
 /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_science_linhpsdr/linhpsdr/work/compwrap/cc/usr/bin/gcc-4.2
 -Wno-deprecated-declarations -D SOUNDIO -D GIT_DATE='""' -D
 GIT_VERSION='""' -D MIDI -D SOAPYSDR  -O3 -g -D MIDI `pkg-config --cflags
 gtk+-3.0`   -c -o discovery.o discovery.c
 /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_science_linhpsdr/linhpsdr/work/compwrap/cc/usr/bin/gcc-4.2
 -Wno-deprecated-declarations -D SOUNDIO -D GIT_DATE='""' -D
 GIT_VERSION='""' -D MIDI -D SOAPYSDR  -O3 -g -D MIDI `pkg-config --cflags
 gtk+-3.0`   -c -o protocol1_discovery.o protocol1_discovery.c
 /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_science_linhpsdr/linhpsdr/work/compwrap/cc/usr/bin/gcc-4.2
 -Wno-deprecated-declarations -D SOUNDIO -D GIT_DATE='""' -D
 GIT_VERSION='""' -D MIDI -D SOAPYSDR  -O3 -g -D MIDI `pkg-config --cflags
 gtk+-3.0`   -c -o protocol2_discovery.o protocol2_discovery.c
 audio.c: In function ‘write_callback’:
 audio.c:130: error: ‘for’ loop initial declaration used outside C99 mode
 audio.c:131: error: ‘for’ loop initial declaration used outside C99 mode
 audio.c:157: error: ‘for’ loop initial declaration used outside C99 mode
 audio.c:158: error: ‘for’ loop initial declaration used outside C99 mode
 audio.c: In function ‘audio_open_output’:
 audio.c:246: error: ‘for’ loop initial declaration used outside C99 mode
 audio.c: In function ‘audio_open_input’:
 audio.c:447: error: ‘for’ loop initial declaration used outside C99 mode
 audio.c: In function ‘create_audio’:
 audio.c:1179: error: ‘for’ loop initial declaration used outside C99 mode
 audio.c:1201: error: redefinition of ‘i’
 audio.c:1179: error: previous definition of ‘i’ was here
 audio.c:1201: error: ‘for’ loop initial declaration used outside C99 mode
 /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_science_linhpsdr/linhpsdr/work/compwrap/cc/usr/bin/gcc-4.2
 -Wno-deprecated-declarations -D SOUNDIO -D GIT_DATE='""' -D
 GIT_VERSION='""' -D MIDI -D SOAPYSDR  -O3 -g -D MIDI `pkg-config --cflags
 gtk+-3.0`   -c -o property.o property.c
 make: *** [audio.o] Error 1
 make: *** Waiting for unfinished jobs....
 }}}

 Notice, it should use LegacySupport as well, and its flags are also
 missing.

-- 
Ticket URL: <https://trac.macports.org/ticket/70305>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list