Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#56241 closed defect (fixed)

jack @ 1.9.12_0 fails to upgrade due to using installed headers

Reported by: ci42 Owned by: neverpanic (Clemens Lang)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: neverpanic (Clemens Lang), mf2k (Frank Schima)
Port: jack

Description

See the attached log.

Attachments (1)

main.log (42.4 KB) - added by ci42 7 years ago.

Download all attachments as: .zip

Change History (11)

Changed 7 years ago by ci42

Attachment: main.log added

comment:1 Changed 7 years ago by mf2k (Frank Schima)

Cc: mf2k added

comment:2 Changed 7 years ago by mf2k (Frank Schima)

I see this on 10.12.6 too.

comment:3 Changed 7 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Owner: set to MarcusCalhoun-Lopez
Status: newassigned
Summary: jack @ 1.9.12_0 fails to build on 10.10.5jack @ 1.9.12_0 fails to upgrade due to using installed headers

The issue is that jack's build includes the *installed* headers rather than the packaged ones:

In file included from /opt/local/include/jack/jack.h:29:
/opt/local/include/jack/transport.h:479:3: error: typedef redefinition with different types ('enum jack_transport_bits_t' vs 'enum jack_transport_bits_t')
} jack_transport_bits_t;
  ^
/opt/local/var/macports/build/_Users_jeremy_src_macports_macports-ports_audio_jack/jack/work/jack2-1.9.12/common/jack/types.h:703:3: note: previous definition is here
} jack_transport_bits_t;
  ^

comment:4 Changed 7 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Owner: changed from MarcusCalhoun-Lopez to neverpanic

comment:5 Changed 7 years ago by ctreleaven (Craig Treleaven)

I think pkg-config is causing this problem. When it checks for either libsamplerate or libsndfile, it returns an include path that we don't want:

$ pkg-config --cflags-only-I samplerate
-I/opt/local/include

Based on help from the pkg-config mailing list, setting an environment variable can fix this, ala:

$ PKG_CONFIG_SYSTEM_INCLUDE_PATH=/opt/local/include pkg-config --cflags-only-I samplerate

I have the same issue with my mythtv ports and use:

# make pkg-config act like on Linux, no '-I/opt/local/include' in cflags
configure.env-append    PKG_CONFIG_SYSTEM_INCLUDE_PATH=${prefix}/include

I haven't actually tested building jack with this change, however. HTH.

comment:6 Changed 7 years ago by raimue (Rainer Müller)

The included waf might just be too old: https://github.com/waf-project/waf/issues/1505

comment:7 Changed 7 years ago by neverpanic (Clemens Lang)

Meh, didn't notice because I was building in trace mode, which prevents this problem. Can somebody test wether setting PKG_CONFIG_SYSTEM_INCLUDE_PATH solves this? If not, I guess we're left with the conflicts-build PortGroup, which is not ideal.

comment:8 Changed 7 years ago by neverpanic (Clemens Lang)

Actually, I guess this might be a good case for the deactivate hack instead. I'll apply that.

comment:9 Changed 7 years ago by neverpanic (Clemens Lang)

Resolution: fixed
Status: assignedclosed

In a4e16dbb046d89f9146dbc9408f2bfb96ec73a82/macports-ports:

jack: Fix upgrade path from jack1

The include order generated by the waf version packaged by jack2 is
incorrect, which leads to build failures when upgrading from jack1 to
jack2 because the build picks up the old jack headers. To avoid this,
add a version of the deactivate hack that will deactivate jack1 right
before the build.

Since this is an uncommon version of the deactivate hack that runs with
dropped privileges, separate privilege elevation is necessary.

Closes: #56241

comment:10 Changed 7 years ago by neverpanic (Clemens Lang)

Upstream at https://github.com/jackaudio/jack2/issues/343, jack2 should bundle a newer version of waf.

Note: See TracTickets for help on using tickets.