corinnekrych / swift-rpm

Swift RPM for Fedora
Apache License 2.0
32 stars 8 forks source link

fails to build on fedora 25 #8

Open ktsaou opened 7 years ago

ktsaou commented 7 years ago

Hi,

I am getting this error on fedora 25:

/root/rpmbuild/BUILD/build/buildbot_linux/swift-linux-x86_64/bin/swiftc -whole-module-optimization -emit-library -c /root/rpmbuild/BUILD/swift-corelibs-libdispatch/src/swift/Block.swift /root/rpmbuild/BUILD/swift-corelibs-libdispatch/src/swift/Data.swift /root/rpmbuild/BUILD/swift-corelibs-libdispatch/src/swift/Dispatch.swift /root/rpmbuild/BUILD/swift-corelibs-libdispatch/src/swift/IO.swift /root/rpmbuild/BUILD/swift-corelibs-libdispatch/src/swift/Private.swift /root/rpmbuild/BUILD/swift-corelibs-libdispatch/src/swift/Queue.swift /root/rpmbuild/BUILD/swift-corelibs-libdispatch/src/swift/Source.swift /root/rpmbuild/BUILD/swift-corelibs-libdispatch/src/swift/Time.swift /root/rpmbuild/BUILD/swift-corelibs-libdispatch/src/swift/Wrapper.swift \
-Xcc -fmodule-map-file=/root/rpmbuild/BUILD/swift-corelibs-libdispatch/dispatch/module.modulemap -I/root/rpmbuild/BUILD/swift-corelibs-libdispatch -Xcc -fblocks -O -module-name Dispatch -module-link-name dispatch \
-o /root/rpmbuild/BUILD/build/buildbot_linux/libdispatch-linux-x86_64/src/swift/swift_overlay.o -emit-module-path /root/rpmbuild/BUILD/build/buildbot_linux/libdispatch-linux-x86_64/src/swift/Dispatch.swiftmodule
/root/rpmbuild/BUILD/swift-corelibs-libdispatch/src/swift/IO.swift:71:21: error: invalid redeclaration of 'init(type:path:oflag:mode:queue:cleanupHandler:)'
        public convenience init?(
                           ^
/root/rpmbuild/BUILD/swift-corelibs-libdispatch/src/swift/IO.swift:59:21: note: 'init(type:path:oflag:mode:queue:cleanupHandler:)' previously declared here
        public convenience init(
                           ^
Makefile:997: recipe for target '/root/rpmbuild/BUILD/build/buildbot_linux/libdispatch-linux-x86_64/src/swift/swift_overlay.o' failed
make[2]: *** [/root/rpmbuild/BUILD/build/buildbot_linux/libdispatch-linux-x86_64/src/swift/swift_overlay.o] Error 1
make[2]: Leaving directory '/root/rpmbuild/BUILD/build/buildbot_linux/libdispatch-linux-x86_64/src'
Makefile:540: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/root/rpmbuild/BUILD/build/buildbot_linux/libdispatch-linux-x86_64/src'
Makefile:456: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
./utils/build-script: fatal error: command terminated with a non-zero exit status 2, aborting
./utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting
error: Bad exit status from /var/tmp/rpm-tmp.uixTYM (%build)

RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.uixTYM (%build)

Is it something on my side?

tachoknight commented 7 years ago

What version of Swift are you trying to build? I've seen similar errors on snapshots, so I stick to releases (3.1 being the latest).

On 27 Apr 2017, at 10:41, Costa Tsaousis wrote:

Hi,

I am getting this error on fedora 25:

/root/rpmbuild/BUILD/build/buildbot_linux/swift-linux-x86_64/bin/swiftc 
-whole-module-optimization -emit-library -c 
/root/rpmbuild/BUILD/swift-corelibs-libdispatch/src/swift/Block.swift 
/root/rpmbuild/BUILD/swift-corelibs-libdispatch/src/swift/Data.swift 
/root/rpmbuild/BUILD/swift-corelibs-libdispatch/src/swift/Dispatch.swift 
/root/rpmbuild/BUILD/swift-corelibs-libdispatch/src/swift/IO.swift 
/root/rpmbuild/BUILD/swift-corelibs-libdispatch/src/swift/Private.swift 
/root/rpmbuild/BUILD/swift-corelibs-libdispatch/src/swift/Queue.swift 
/root/rpmbuild/BUILD/swift-corelibs-libdispatch/src/swift/Source.swift 
/root/rpmbuild/BUILD/swift-corelibs-libdispatch/src/swift/Time.swift 
/root/rpmbuild/BUILD/swift-corelibs-libdispatch/src/swift/Wrapper.swift 
\
-Xcc 
-fmodule-map-file=/root/rpmbuild/BUILD/swift-corelibs-libdispatch/dispatch/module.modulemap 
-I/root/rpmbuild/BUILD/swift-corelibs-libdispatch -Xcc -fblocks -O 
-module-name Dispatch -module-link-name dispatch \
-o 
/root/rpmbuild/BUILD/build/buildbot_linux/libdispatch-linux-x86_64/src/swift/swift_overlay.o 
-emit-module-path 
/root/rpmbuild/BUILD/build/buildbot_linux/libdispatch-linux-x86_64/src/swift/Dispatch.swiftmodule
/root/rpmbuild/BUILD/swift-corelibs-libdispatch/src/swift/IO.swift:71:21: 
error: invalid redeclaration of 
'init(type:path:oflag:mode:queue:cleanupHandler:)'
        public convenience init?(
                           ^
/root/rpmbuild/BUILD/swift-corelibs-libdispatch/src/swift/IO.swift:59:21: 
note: 'init(type:path:oflag:mode:queue:cleanupHandler:)' previously 
declared here
        public convenience init(
                           ^
Makefile:997: recipe for target 
'/root/rpmbuild/BUILD/build/buildbot_linux/libdispatch-linux-x86_64/src/swift/swift_overlay.o' 
failed
make[2]: *** 
[/root/rpmbuild/BUILD/build/buildbot_linux/libdispatch-linux-x86_64/src/swift/swift_overlay.o] 
Error 1
make[2]: Leaving directory 
'/root/rpmbuild/BUILD/build/buildbot_linux/libdispatch-linux-x86_64/src'
Makefile:540: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory 
'/root/rpmbuild/BUILD/build/buildbot_linux/libdispatch-linux-x86_64/src'
Makefile:456: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
./utils/build-script: fatal error: command terminated with a non-zero 
exit status 2, aborting
./utils/build-script: fatal error: command terminated with a non-zero 
exit status 1, aborting
error: Bad exit status from /var/tmp/rpm-tmp.uixTYM (%build)

RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.uixTYM (%build)

Is it something on my side?

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/corinnekrych/swift-rpm/issues/8

corinnekrych commented 7 years ago

@ktsaou I've get passed that error with @tachoknight PR https://github.com/corinnekrych/swift-rpm/pull/6 which is using a 3.1 fork of swift repo.

ktsaou commented 7 years ago

@tachoknight I am giving a shot now. @corinnekrych I haven't configured anything. I checked out the repo and run ./rpm-from-source.sh

tachoknight commented 7 years ago

@ktsaou Still having any issues?

ktsaou commented 7 years ago

Just tried again on f27. I get this error:

Installing:
 libbsd-devel                        x86_64                        0.8.3-5.fc27                        fedora                        110 k

Transaction Summary
===========================================================================================================================================
Install  1 Package

Total download size: 110 k
Installed size: 178 k
Downloading Packages:
libbsd-devel-0.8.3-5.fc27.x86_64.rpm                                                                       361 kB/s | 110 kB     00:00    
-------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                       86 kB/s | 110 kB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: Transaction check error:
  file /usr/share/man/man3/explicit_bzero.3.gz from install of libbsd-devel-0.8.3-5.fc27.x86_64 conflicts with file from package man-pages-4.12-1.fc27.noarch

I guess libbsd-devel is broken?

tachoknight commented 7 years ago

Huh, the package conflicts with a man pages package? Not sure what's going on there, but it seems there's definitely some weirdness in your Fedora setup. Might want to try removing the package entirely with dnf and try again.

ktsaou commented 7 years ago

I think it is a documented bug: https://bugzilla.redhat.com/show_bug.cgi?id=1504831

stefanos1316 commented 6 years ago

I have also tried on installing swift on Fedora 27 and I get this message

swift/linux/x86_64/libswiftCore.so && :
cd /root/rpmbuild/BUILD/build/buildbot_linux/swift-linux-x86_64/stdlib/private/StdlibUnicodeUnittest && /usr/bin/cmake -E copy /root/rpmbuild/BUILD/build/buildbot_linux/swift-linux-x86_64/lib/swift/linux/x86_64/libswiftStdlibUnicodeUnittest.so /root/rpmbuild/BUILD/build/buildbot_linux/swift-linux-x86_64/./lib/swift/linux/libswiftStdlibUnicodeUnittest.so
cd /root/rpmbuild/BUILD/build/buildbot_linux/swift-linux-x86_64/stdlib/private/StdlibCollectionUnittest && /usr/bin/cmake -E copy /root/rpmbuild/BUILD/build/buildbot_linux/swift-linux-x86_64/lib/swift/linux/x86_64/libswiftStdlibCollectionUnittest.so /root/rpmbuild/BUILD/build/buildbot_linux/swift-linux-x86_64/./lib/swift/linux/libswiftStdlibCollectionUnittest.so
cd /root/rpmbuild/BUILD/build/buildbot_linux/swift-linux-x86_64/test && /usr/bin/cmake -E remove_directory `/root/rpmbuild/BUILD/build/buildbot_linux/swift-linux-x86_64/./swift-test-results/x86_64-unknown-linux-gnu` && /usr/bin/cmake -E make_directory /root/rpmbuild/BUILD/build/buildbot_linux/swift-linux-x86_64/./swift-test-results/x86_64-unknown-linux-gnu && /bin/python /root/rpmbuild/BUILD/llvm/utils/lit/lit.py --incremental -v --xunit-xml-output=/root/rpmbuild/BUILD/build/buildbot_linux/swift-linux-x86_64/./swift-test-results/x86_64-unknown-linux-gnu/lit-tests.xml --param swift_test_subset=only_long --param swift_test_mode=optimize_none /root/rpmbuild/BUILD/build/buildbot_linux/swift-linux-x86_64/test-linux-x86_64 /root/rpmbuild/BUILD/build/buildbot_linux/swift-linux-x86_64/test/../validation-test-linux-x86_64
/root/rpmbuild/BUILD/swift/utils/build-script-impl: line 2917: /bin/sh: Argument list too long
*** Failed while running tests for swift (check-swift-only_long-linux-x86_64)
./utils/build-script: fatal error: command terminated with a non-zero exit status 126, aborting
./utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting
error: Bad exit status from /var/tmp/rpm-tmp.EQPZ2V (%build)

RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.EQPZ2V (%build)

Any idea how to overcome it?

tachoknight commented 6 years ago

Hmm, I'll give it another try on my F27 machine and see if I can reproduce it.

tachoknight commented 6 years ago

@stefanos1316 Couple of things...are you trying to build the version straight from github, or updating to a later version? The error you have on line 2917 is interesting...can you post what that line is?

stefanos1316 commented 6 years ago

@tachoknight it is a newly cloned version straight from GitHub. The error appears during this step:

[618/618] Linking CXX executable unittests/runtime/SwiftRuntimeTests
--- Running tests for swift ---
--- check-swift-only_long-linux-x86_64 ---
tachoknight commented 6 years ago

@stefanos1316 I'm still investigating this; I had this or a similar problem and it turned out to be, of all things, removing a Python library to make it work; I'm trying to go back through my notes and history to figure out which is the library in question. Basically what the problem was that the test code includes the library that performs a bunch of tests that fail; if the library is not present, the test continues without doing that specific job and so it successfully builds.

tachoknight commented 6 years ago

@stefanos1316 Do you have the pexpect Python library installed? That was the library I mention in the comment above; it was preventing one of my machines from building Swift correctly.

stefanos1316 commented 6 years ago

@tachoknight I do not have the specific library installed

[sgeorgiou@localhost swift-rpm]$ python -c "import pexpect"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named pexpect

I will try the 3.1 version to see if it is running

stefanos1316 commented 6 years ago

@tachoknight I tried rebuilding it again on my Fedora 27 and I can confirm the successful build of the swift. Thanks a lot for your time!