On Fri, Dec 4, 2015 at 6:08 AM, Ryan Lovelett <swift-...@ryan.lovelett.me> wrote: > I know that Arch Linux is not a "Supported Target Platforms" so I guess > this may be off topic. > > However, I'm trying to make an PKGBUILD script so that Swift can be > installed from the AUR (and perhaps eventually from the main > repositories). See: https://github.com/RLovelett/swift-aur > > For the most part everything is going swimmingly until it goes to link > the shared library libswiftCore.so. So as not to clutter up this message > with the full log (see attached allout.txt). The germane part is that it > is failing to link the references from `pthread_rwlock_rdlock`, > `pthread_rwlock_unlock`, `pthread_rwlock_wrlock`, `dlopen`, `dlsym` and > `dlclose`. As far as I know they all come from pthreads and dl (e.g., > `-lpthread` and `-ldl`) which can clearly be seen in the failed command > as having been sent to clang++. > > I guess I should also say the command I am using to build is > `swift/utils/build-script -R`; though if you want to see all the > commands checkout the Github URL above.
I think the issue is that '-lpthread -ldl' are being specified too early on the link line, before the object files. Could you try editing the link command to put '-lpthread -ldl' at the end and retrying it in the build directory after the failure? For a package build, I would also recommend running the build script in preset mode and using the 'buildbot_linux_1404' preset: $ ./swift/utils/build-script --preset=buildbot_linux_1404 installable_package=/tmp/swift.tar.gz install_destdir=/tmp/swift-install This will build the package the same way as the swift.org packages. Dmitri -- main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if (j){printf("%d\n",i);}}} /*Dmitri Gribenko <griboz...@gmail.com>*/ _______________________________________________ swift-dev mailing list swift-dev@swift.org https://lists.swift.org/mailman/listinfo/swift-dev