Build is incompatible with SCons 3 / Python 3

Bug #1732272 reported by Uwe Klotz
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Medium
Unassigned

Bug Description

After upgrading to Fedora 27 and SCons 3.0.0 the build aborts immediately with the following error:

scons: Reading SConscript files ...
ModuleNotFoundError: No module named 'util':
  File "/home/uk/Projects/Mixxx/mixxx/SConstruct", line 29:
    from build import mixxx, features, depends
  File "/home/uk/Projects/Mixxx/mixxx/build/mixxx.py", line 15:
    import util

Real blocker, I'm currently not able to build Mixxx. Any ideas?

Revision history for this message
Daniel Schürmann (daschuer) wrote :
Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

What happens if you remove/comment out the 'import util' line in mixxx.py?

Changed in mixxx:
importance: Undecided → High
Be (be.ing)
Changed in mixxx:
importance: High → Critical
milestone: none → 2.1.0
Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote :

Thanks, imports fixed:

from .<optional-subfolder> import <package>

But now the next blocker appeared:

ERROR:root:Couldn't determine platform. os.name: posix sys.platform: linux
Exception: invalid target platform:
  File "/home/uk/Projects/Mixxx/mixxx/SConstruct", line 72:
    toolchain, available_features)
  File "/home/uk/Projects/Mixxx/mixxx/build/mixxx.py", line 46:
    raise Exception("invalid target platform")

summary: - SCons 3.0.0 on Fedora 27: ModuleNotFoundError
+ SCons 3.0.0 on Fedora 27: Build failure
Changed in mixxx:
status: New → In Progress
assignee: nobody → Uwe Klotz (uklotzde)
Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote : Re: SCons 3.0.0 on Fedora 27: Build failure

Next one fixed. But there are still print errors:

  File "/home/uk/Projects/Mixxx/mixxx/build/qt4.py", line 192

    print "scons: qt4: Scanning '%s' (header of '%s')" % (str(h), str(cpp))

SyntaxError: invalid syntax

Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

Critical is for _application_ show-stopper bugs (i.e. crashes in the middle of a set doing normal things.)

Changed in mixxx:
importance: Critical → Medium
milestone: 2.1.0 → none
Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote :

...many legacy print statements :(

Revision history for this message
Be (be.ing) wrote :

If the application can't build at all, nothing about the application matters, therefore this is critical.

Changed in mixxx:
milestone: none → 2.1.0
Revision history for this message
Daniel Schürmann (daschuer) wrote :

This should be already fixed in master:
https://github.com/mixxxdj/mixxx/pull/1361

Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote :
Changed in mixxx:
assignee: Uwe Klotz (uklotzde) → nobody
Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote :

TODO: build/osx/OSConsX.py still contains many legacy print statements as a simple grep reveals.

Revision history for this message
Sébastien BLAISOT (sblaisot) wrote :

@Be I disagree. we curently have everything we need to build the application with scons 2.x on CI and build server.

so this is not critical project-wide. This is only critical for developpers that updated to a bleeding-edge scons 3.

mixxx build prerequisites are stuck to scons 2.x.

it is important to fix mixxx build to work with scons 3 but this is not a release blocker.

Revision history for this message
Conner Phillips (lindybalboa) wrote :

@uklotzde, despite the print statements being fixed to be python3 compatible, the scons binary still needs to be called using python2 because of the util module. I agree it is a messed up situation and all of the python files need a close inspection to get them up to python3 standards.

In the mean time, with python3 as my environmental python, I can succesfully use this code to compile mixxx:

python2 /usr/bin/scons ...+ whatever flags you choose

Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote :

Will not be fixed for Mixxx 2.1.

A temporary workaround is documented in the Wiki:
https://mixxx.org/wiki/doku.php/compiling_on_linux

summary: - SCons 3.0.0 on Fedora 27: Build failure
+ Build is incompatible with SCons 3 / Python 3
Changed in mixxx:
status: In Progress → Confirmed
milestone: 2.1.0 → none
Revision history for this message
bdbaddog (bill-baddogconsulting) wrote :

SCons 3.0.1 fixed the issue with requiring python3 style print statements when running scons with python 2.7.x.

Are there other issues?

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :
Changed in mixxx:
status: Confirmed → Fix Released
Be (be.ing)
Changed in mixxx:
milestone: none → 2.3.0
status: Fix Released → Fix Committed
Changed in mixxx:
status: Fix Committed → 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/8973

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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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