CFLAGS and lib-install directory not propagated

Bug #1184432 reported by Steven Boswell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Undecided
Steven Boswell

Bug Description

I found two bugs while trying to make an RPM of Mixxx 1.11.0 for the RPMFusion repository.

build/mixxx.py reads the external-environment variable CFLAGS, and then saves it in the internal-environment dictionary keyed by CFLAGS, but the rest of the build system uses CCFLAGS. The enclosed patch fixes that.

Also, the install paths for bin, lib, and share were being hardcoded (by src/SConscript) relative to the prefix. In 64-bit Fedora builds, the library directory is "/usr/lib64", not "/usr/lib". I made it possible to specify environment variables BINDIR, LIBDIR, and SHAREDIR, so that the default could be overridden if necessary.

Please consider applying this patch to the 1.11.0 release branch.

Tags: build
Revision history for this message
Steven Boswell (ulatekh) wrote :
Changed in mixxx:
assignee: nobody → Steven Boswell (ulatekh)
Revision history for this message
RJ Skerry-Ryan (rryan) wrote : Re: [Bug 1184432] [NEW] CFLAGS and lib-install directory not propagated

Hey Steven,

Thanks for the patch. CCFLAGS is a SCons-ism:
http://www.scons.org/doc/1.1.0/HTML/scons-user/a4761.html#cv-CCFLAGS

CFLAGS/CXXFLAGS is intentional when reading the environment variables
because it allows you to customize them independently. We use CCFLAGS
everywhere else to prevent copypasta.

On Sun, May 26, 2013 at 5:44 PM, Steven Boswell <email address hidden> wrote:

> Public bug reported:
>
> I found two bugs while trying to make an RPM of Mixxx 1.11.0 for the
> RPMFusion repository.
>
> build/mixxx.py reads the external-environment variable CFLAGS, and then
> saves it in the internal-environment dictionary keyed by CFLAGS, but the
> rest of the build system uses CCFLAGS. The enclosed patch fixes that.
>
> Also, the install paths for bin, lib, and share were being hardcoded (by
> src/SConscript) relative to the prefix. In 64-bit Fedora builds, the
> library directory is "/usr/lib64", not "/usr/lib". I made it possible
> to specify environment variables BINDIR, LIBDIR, and SHAREDIR, so that
> the default could be overridden if necessary.
>
> Please consider applying this patch to the 1.11.0 release branch.
>
> ** Affects: mixxx
> Importance: Undecided
> Assignee: Steven Boswell (ulatekh)
> Status: New
>
> ** Patch added: "mixxx-1.11.0-installpath.patch"
>
> https://bugs.launchpad.net/bugs/1184432/+attachment/3687436/+files/mixxx-1.11.0-installpath.patch
>
> ** Changed in: mixxx
> Assignee: (unassigned) => Steven Boswell (ulatekh)
>
> --
> You received this bug notification because you are a member of Mixxx
> Development Team, which is subscribed to Mixxx.
> https://bugs.launchpad.net/bugs/1184432
>
> Title:
> CFLAGS and lib-install directory not propagated
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/mixxx/+bug/1184432/+subscriptions
>

Revision history for this message
Steven Boswell (ulatekh) wrote :

Maybe I'm misunderstanding the code. In the unpatched version, it read the CFLAGS external-environment variable, but assigned it to the internal-environment variable CFLAGS, which was never used. So I thought my fix was necessary.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote : Re: [Bug 1184432] Re: CFLAGS and lib-install directory not propagated

No worries. You can think of the way scons builds the command like this:

gcc $CCFLAGS $CFLAGS
g++ $CCFLAGS $CXXFLAGS

So CCFLAGS is for what should be common.
On May 27, 2013 9:30 AM, "Steven Boswell" <email address hidden> wrote:

> Maybe I'm misunderstanding the code. In the unpatched version, it read
> the CFLAGS external-environment variable, but assigned it to the
> internal-environment variable CFLAGS, which was never used. So I
> thought my fix was necessary.
>
> --
> You received this bug notification because you are a member of Mixxx
> Development Team, which is subscribed to Mixxx.
> https://bugs.launchpad.net/bugs/1184432
>
> Title:
> CFLAGS and lib-install directory not propagated
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/mixxx/+bug/1184432/+subscriptions
>

Revision history for this message
Steven Boswell (ulatekh) wrote :

OK, fair enough. This revised version of the patch should still be useful, to allow the bin/lib/share install directories to be overridden. I needed to override LIBDIR to get the 64-bit version of the RPMFusion package to build correctly. If you'd rather have them as scons parameters instead of environment variables, I can do that instead.

Revision history for this message
Steven Boswell (ulatekh) wrote :

Argh...the plugin path was hardcoded too.
The enclosed patch involves a more elaborate solution, but fixes both the install path and the plugin path.
Now I have to re-submit the package to RPMFusion.

RJ Skerry-Ryan (rryan)
tags: added: build
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Thanks Steven -- looks good. Applied to 1.11 and master.

Changed in mixxx:
status: New → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/7056

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.