Opened 6 years ago

Closed 5 years ago

#56869 closed defect (wontfix)

serf1 @1.3.9: scons fails when python27 is 32-bit

Reported by: maurogaio Owned by: blair (Blair Zajac)
Priority: Normal Milestone:
Component: ports Version: 2.5.3
Keywords: Cc: ryandesign (Ryan Carsten Schmidt)
Port: serf1

Description (last modified by mf2k (Frank Schima))

--->  Computing dependencies for serf1
--->  Fetching archive for serf1
--->  Attempting to fetch serf1-1.3.9_0.darwin_17.i386.tbz2 from http://lil.fr.packages.macports.org/serf1
--->  Attempting to fetch serf1-1.3.9_0.darwin_17.i386.tbz2 from https://packages.macports.org/serf1
--->  Attempting to fetch serf1-1.3.9_0.darwin_17.i386.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/serf1
--->  Fetching distfiles for serf1
--->  Verifying checksums for serf1
--->  Extracting serf1
--->  Applying patches to serf1
--->  Configuring serf1
--->  Building serf1
Error: Failed to build serf1: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_www_serf1/serf1/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port serf1 failed

Change History (7)

comment:1 Changed 6 years ago by maurogaio

:notice:build ---> Building serf1 :debug:build Executing org.macports.build (serf1) :debug:build Environment: :debug:build CC_PRINT_OPTIONS='YES' :debug:build CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_www_serf1/serf1/work/.CC_PRINT_OPTIONS' :debug:build CPATH='/opt/local/include' :debug:build LIBRARY_PATH='/opt/local/lib' :debug:build MACOSX_DEPLOYMENT_TARGET='10.13' :info:build Executing: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_www_serf1/serf1/work/serf-1.3.9" && /opt/local/bin/scons -j4 APR=/opt/local APU=/opt/local OPENSSL=/opt/local PREFIX=/opt/local CC=/usr/bin/clang CPPFLAGS="-I/opt/local/include" CFLAGS="-Os -arch i386" LINKFLAGS="-L/opt/local/lib -Wl,-headerpad_max_install_names -arch i386" CC="MACOSX_DEPLOYMENT_TARGET=10.13 /usr/bin/clang" :debug:build system: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_www_serf1/serf1/work/serf-1.3.9" && /opt/local/bin/scons -j4 APR=/opt/local APU=/opt/local OPENSSL=/opt/local PREFIX=/opt/local CC=/usr/bin/clang CPPFLAGS="-I/opt/local/include" CFLAGS="-Os -arch i386" LINKFLAGS="-L/opt/local/lib -Wl,-headerpad_max_install_names -arch i386" CC="MACOSX_DEPLOYMENT_TARGET=10.13 /usr/bin/clang" :info:build SCons import failed. Unable to find engine files in: :info:build /opt/local/bin/../engine :info:build /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/scons-local-3.0.1 :info:build /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/scons-local :info:build /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/scons-3.0.1 :info:build /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/scons-3.0.1 :info:build /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scons-3.0.1 :info:build /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scons-3.0.1 :info:build /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/scons-3.0.1 :info:build /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/scons :info:build /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/scons :info:build /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scons :info:build /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scons :info:build /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/scons :info:build Traceback (most recent call last): :info:build File "/opt/local/bin/scons", line 192, in <module> :info:build import SCons.Script :info:build File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/scons-3.0.1/SCons/init.py", line 43, in <module> :info:build import SCons.compat :info:build File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/scons-3.0.1/SCons/compat/init.py", line 97, in <module> :info:build import pickle :info:build File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py", line 34, in <module> :info:build import struct :info:build File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/struct.py", line 1, in <module> :info:build from _struct import * :info:build ImportError: No module named _struct :info:build Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_www_serf1/serf1/work/serf-1.3.9" && /opt/local/bin/scons -j4 APR=/opt/local APU=/opt/local OPENSSL=/opt/local PREFIX=/opt/local CC=/usr/bin/clang CPPFLAGS="-I/opt/local/include" CFLAGS="-Os -arch i386" LINKFLAGS="-L/opt/local/lib -Wl,-headerpad_max_install_names -arch i386" CC="MACOSX_DEPLOYMENT_TARGET=10.13 /usr/bin/clang" :info:build Exit code: 1 :error:build Failed to build serf1: command execution failed

Version 0, edited 6 years ago by maurogaio (next)

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

Owner: set to blair
Status: newassigned

In the future, please use WikiFormatting and add the port maintainer(s) to Cc (port info --maintainers serf1), if any.

comment:3 Changed 6 years ago by mf2k (Frank Schima)

Description: modified (diff)

comment:4 Changed 6 years ago by blair (Blair Zajac)

It looks like there's something odd with your setup:

File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/struct.py", line 1, in <module> :info:build from _struct import * :info:build ImportError: No module named _struct

This should work

$ python2.7
Python 2.7.15 (default, Jul 18 2018, 15:02:33) 
[GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Setting tab completion.
>>> import struct

comment:5 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

Out of curiosity, why are you trying to build for 32-bit, rather than 64-bit as would be usual on High Sierra (and indeed on Lion and later)? Have you deliberately (or accidentally?) changed build_arch in macports.conf?

comment:6 Changed 6 years ago by maurogaio

python27: I've fixed the problem with my python setup, but it still does not work.

32-bit : Yes initially I wanted to try to make a migration to retain the ability to run afterwards old applications.

Solution: I removed the 32-bit option and reinstalled macports completely, it works

comment:7 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign added
Resolution: wontfix
Status: assignedclosed
Summary: Failed to build serf1: command execution failedserf1 @1.3.9: scons fails when python27 is 32-bit

I am able to reproduce this issue, if python27 has been installed for arch i386 only on a 64-bit computer. I don't think we've encountered anyone else trying to use such a configuration, so I don't think we're likely to spend a lot of time trying to fix it. On a 64-bit computer, set build_arch in macports.conf to x86_64 (that's the default) and let MacPorts build 64-bit software. If you still want 32-bit support, make sure universal_archs is x86_64 i386 (that's the default) and install ports with the +universal variant, which will give you programs and libraries that can be used from both 32-bit and 64-bit. I have most of my ports installed universal on High Sierra and it works fine for serf1. Trying to build serf1 with the 32-bit part of the universal python27 (by editing the serf1 portfile and changing build.cmd to arch -i386 ${prefix}/bin/python2.7 ${prefix}/bin/scons) still fails (with a slightly different error: ImportError: dynamic module does not define init function (init_struct)), so there may be a general problem with 32-bit python27 on 64-bit Macs, or it may be a problem specific to scons.

Note: See TracTickets for help on using tickets.