Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python-2.7.14: Compile Python 2.7.14 error macOS 10.13.2 #5310

Closed
kholisrag opened this issue Dec 21, 2017 · 8 comments
Closed

python-2.7.14: Compile Python 2.7.14 error macOS 10.13.2 #5310

kholisrag opened this issue Dec 21, 2017 · 8 comments

Comments

@kholisrag
Copy link

kholisrag commented Dec 21, 2017

Maintainer: @commodo
Environment: LEDE, branch master
Package: python2
Description:
Compile for python 2.7.14 error macOS 10.13.2 High Sierra

I'm using this tutorial for macos, brew and case-sensitive : https://wiki.openwrt.org/doc/howto/buildroot.exigence.macosx

here the terminal stderr:

(cd /Volumes/Lede/Lede/build_dir/hostpkg/Python-2.7.14/; if [ -x configure ]; then cp -fpR /Volumes/Lede/Lede/scripts/config.{guess,sub} /Volumes/Lede/Lede/build_dir/hostpkg/Python-2.7.14// && CC="gcc" CFLAGS="-O2 -I/Volumes/Lede/Lede/staging_dir/host/include -I/Volumes/Lede/Lede/staging_dir/host/usr/include -I/Volumes/Lede/Lede/staging_dir/hostpkg/include -I/Volumes/Lede/Lede/staging_dir/target-mips_24kc_musl/host/include" CPPFLAGS="-I/Volumes/Lede/Lede/staging_dir/host/include -I/Volumes/Lede/Lede/staging_dir/host/usr/include -I/Volumes/Lede/Lede/staging_dir/hostpkg/include -I/Volumes/Lede/Lede/staging_dir/target-mips_24kc_musl/host/include" LDFLAGS="-L/Volumes/Lede/Lede/staging_dir/host/lib -L/Volumes/Lede/Lede/staging_dir/host/usr/lib -L/Volumes/Lede/Lede/staging_dir/hostpkg/lib -L/Volumes/Lede/Lede/staging_dir/target-mips_24kc_musl/host/lib -Wl,--no-as-needed -lrt $(pkg-config --static --libs libcrypto libssl)" CONFIG_SHELL="/usr/bin/env bash" bash ./configure --target=x86_64-apple-darwin17.3.0 --host=x86_64-apple-darwin17.3.0 --build=x86_64-apple-darwin17.3.0 --program-prefix="" --program-suffix="" --prefix=/Volumes/Lede/Lede/staging_dir/hostpkg --exec-prefix=/Volumes/Lede/Lede/staging_dir/hostpkg --sysconfdir=/Volumes/Lede/Lede/staging_dir/hostpkg/etc --localstatedir=/Volumes/Lede/Lede/staging_dir/hostpkg/var --sbindir=/Volumes/Lede/Lede/staging_dir/hostpkg/bin --without-cxx-main --without-pymalloc --with-threads --prefix=/Volumes/Lede/Lede/staging_dir/hostpkg --exec-prefix=/Volumes/Lede/Lede/staging_dir/hostpkg --with-system-expat=/Volumes/Lede/Lede/staging_dir/hostpkg --with-system-ffi=no --with-ensurepip=install CONFIG_SITE= ; fi )
checking build system type... x86_64-apple-darwin17.3.0
checking host system type... x86_64-apple-darwin17.3.0
checking for python2.7... python2.7
checking for --enable-universalsdk... no
checking for --with-universal-archs... 32-bit
checking MACHDEP... darwin
checking EXTRAPLATDIR... $(PLATMACDIRS)
checking for --without-gcc... no
checking for --with-icc... no
checking for x86_64-apple-darwin17.3.0-gcc... gcc
checking whether the C compiler works... no
configure: error: in /Volumes/Lede/Lede/build_dir/hostpkg/Python-2.7.14': configure: error: C compiler cannot create executables See config.log' for more details
make[3]: *** [/Volumes/Lede/Lede/build_dir/hostpkg/Python-2.7.14/.configured] Error 77
make[3]: Leaving directory /Volumes/Lede/Lede/feeds/packages/lang/python/python' make[2]: *** [package/feeds/packages/python/python/host/compile] Error 2 make[2]: Leaving directory /Volumes/Lede/Lede'
make[1]: *** [/Volumes/Lede/Lede/staging_dir/target-mips_24kc_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory `/Volumes/Lede/Lede'
make: *** [world] Error 2

this is the log for complete detail...

config.log

Thanks for the respond...

@commodo
Copy link
Contributor

commodo commented Dec 21, 2017

I wish this report would have come a few months ago when I still had a Mac :)

I'll try to guess via the config.log output, but the overall building-on-a-Mac is problematic after each version that gets released.
And homebrew also changes from time to time.
Last I checked was Sierra.

I'll probably try to find a solution [MacOS X on a VM, or something] to take a look.

@kholisrag
Copy link
Author

That's Fine...
I just can build Ubuntu in VM too...
It's nothing major for me...
Thanks for your hard work...

@jpc
Copy link
Contributor

jpc commented Feb 20, 2018

This was caused by 1c54e2b which added -Wl,--no-as-needed to build flags on all platforms. This flag is not supported by the macOS linker.
Reverting that commit helps a bit but unfortunately I have further problems with the _ctypes module: #5638

@commodo
Copy link
Contributor

commodo commented Feb 20, 2018

that flag ( -Wl,--no-as-needed ) was added to support Ubuntu 12.04 ; which is one of those distros people like to keep around forever ;
maybe some sort condition could be added to check for build-host and add it on Linux ;

regarding ctypes ; will move discussion to other issue

@commodo
Copy link
Contributor

commodo commented Feb 20, 2018

maybe we could do

ifneq ($(HOST_OS),Darwin)
 HOST_LDFLAGS += \
	-Wl,--no-as-needed -lrt
endif 

i admit it would be saner/better to check for linker, but that seems a bit more difficult atm ;

commodo added a commit to commodo/packages that referenced this issue Mar 14, 2018
This change was introduced in commit 1c54e2b to address build
issues on Ubuntu 12.04.

However it was reported to cause issues on Mac OS X.
Report: openwrt#5310

It was also reported that removing this on MacOS X fixes the issue.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
@commodo
Copy link
Contributor

commodo commented Mar 14, 2018

@kholisrag
can you please test with the changes in PR #5758 ?

thanks
Alex

@diizzyy
Copy link
Contributor

diizzyy commented Aug 15, 2018

@kholisrag
Ping

lynxis pushed a commit to lynxis/packages that referenced this issue Jan 3, 2019
This change was introduced in commit 1c54e2b to address build
issues on Ubuntu 12.04.

However it was reported to cause issues on Mac OS X.
Report: openwrt#5310

It was also reported that removing this on MacOS X fixes the issue.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
@yousong yousong changed the title ptyhon-2.7.14: Compile Python 2.7.14 error macOS 10.13.2 python-2.7.14: Compile Python 2.7.14 error macOS 10.13.2 Jan 24, 2019
@yousong
Copy link
Member

yousong commented Jan 24, 2019

Maybe the issue is now too old to have a final confirmation, but it's likely that it has been fixed by the commit referred here above.

@yousong yousong closed this as completed Jan 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants