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

[SR-3020] Build script errors with two Python versions on Gentoo #4580

Closed
swift-ci opened this issue Oct 22, 2016 · 1 comment
Closed

[SR-3020] Build script errors with two Python versions on Gentoo #4580

swift-ci opened this issue Oct 22, 2016 · 1 comment
Labels

Comments

@swift-ci
Copy link

Previous ID SR-3020
Radar None
Original Reporter Vladislav (JIRA User)
Type Bug
Status Closed
Resolution Cannot Reproduce
Environment

Linux ved-hp-gentoo 4.4.21-gentoo #2 SMP Thu Oct 6 04:05:37 MSK 2016 x86_64 Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz GenuineIntel GNU/Linux

Additional Detail from JIRA
Votes 0
Component/s LLDB for Swift, Project Infrastructure
Labels Bug, BuildScript, Linux
Assignee None
Priority Medium

md5: 4ce4f5041ceb63de111a2650d24a43c8

Issue Description:

Gentoo has two Python versions installed.
Available Python interpreters:
[1] python2.7
[2] python3.4 *
If Python 3.4 is default version the build script does not run at all. The error I got:

utils/build-script --preset=buildbot_linux install_destdir=$PWD/swift_inst installable_package=$PWD/swift-gentoo.tar.gz
Traceback (most recent call last):
File "utils/build-script", line 2149, in <module>
sys.exit(main())
File "utils/build-script", line 2143, in main
return main_preset()
File "utils/build-script", line 1051, in main_preset
args.preset_substitutions, args.preset_file_names, args.preset)
File "/home/vedg/swift-source/swift/utils/SwiftBuildSupport.py", line 134, in get_preset_options
config = _load_preset_files_impl(preset_file_names, substitutions)
File "/home/vedg/swift-source/swift/utils/SwiftBuildSupport.py", line 72, in _load_preset_files_impl
if config.read(preset_file_names) == []:
File "/usr/lib64/python3.4/configparser.py", line 672, in read
self._read(fp, filename)
File "/usr/lib64/python3.4/configparser.py", line 1070, in _read
fpname, lineno)
configparser.DuplicateOptionError: While reading from '/home/vedg/swift-source/swift/utils/build-presets.ini' [line 328]: option 'mixin-preset' in section 'preset: buildbot_incremental,tools=RA,stdlib=RA,build' already exists

I did change the default Python to 2.7 using "eselect python set 1" command. Then it is working as expected but at the last installation stage I have got another error:

CMake Error at scripts/cmake_install.cmake:36 (file):
file INSTALL cannot find
"/home/vedg/swift-source/build/buildbot_linux/lldb-linux-x86_64/lib/python2.7".
Call Stack (most recent call first):
cmake_install.cmake:42 (include)

FAILED: cd /home/vedg/swift-source/build/buildbot_linux/lldb-linux-x86_64 && /usr/bin/cmake -P cmake_install.cmake
ninja: build stopped: subcommand failed.
utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting

Actually, "/home/vedg/swift-source/build/buildbot_linux/lldb-linux-x86_64/lib64/python3.4" has been created. So, it looks like Python 3.4 has been used for LLDB buid.

To continue I created a symlink from .../lib64/python3.4 to .../lib/python2.7
I know it is not good workaround but build process has been finished successfully.
After installation to /usr simple test:

swift
Welcome to Swift version 3.0-dev (LLVM 2f56c9717e, Clang a44b92f85b, Swift c487c38). Type :help for assistance.
1> 1+3
$R0: Int = 4
2>

@swift-ci
Copy link
Author

Comment by Vladislav Dembskiy (JIRA)

Gentoo has been changed and other issues appears. I reported them separately.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 7, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant