Hello everyone,
I am trying to compile Swift in Ubuntu 14.04 and I found several problems. I have been trying to compile Swift for some days using my own compiled libraries (such us libedit, python, libxml, uuid, sqlite3, libicu, libncurses, etc.) and I unable to link them properly.
When I install the libraries mentioned before from the system (using apt-get install XXX) I can perfectly compile Swift using the "build-script" with the following options:
./swift/utils/build-script --assertions --no-swift-stdlib-assertions --llbuild --swiftpm --xctest --lldb --release --foundation -- --install-swift --install-lldb --install-llbuild --install-swiftpm --install-xctest '--swift-install-components=autolink-driver;compiler;clang-builtin-headers;stdlib;swift-remote-mirror;sdk-overlay;license' --build-swift-static-stdlib --build-swift-stdlib-unittest-extra --install-destdir=/home/juan --installable-package=/home/juan/swift-compiled.tar.gz --install-foundation --reconfigure
However, I want to use my own compiled libraries. I have successfully compiled all the dependences mentioned before under /home/juan/common, so I have all the libraries under /home/juan/common/lib, the binaries under /home/juan/common/bin and the headers under /home/juan/common/include. (NOTE: I did install clang, ninja-build and cmake using "apt-get install XXX, I just compiled the libraries, not the compiling tools).
The problem is that I am unable to configure the "build-script" to use my libraries instead of the system ones, so cmake and clang are unable to find and link them and the compilation process fails. I have tried to use several options but I am still unable to get it. Here you have some of the flags I tried:
--extra-cmake-options='-DICU_UC_INCLUDE_DIR=/home/juan/common/include, -DICU_UC_LIBRARIES=/home/juancommon/lib, -DICU_I18N_INCLUDE_DIR=/home/juan/common/include/, -DICU_I18N_LIBRARIES=/home/juan/common/lib, -DPYTHON_LIBRARY=/home/juan/python/lib/libpython2.7.so, -DPYTHON_INCLUDE_DIR=/home/juan/python/include/python2.7, -DCMAKE_CXX_FLAGS=-I/home/juan/common/include, -DLIBXML2_INCLUDE_DIR=/home/juancommon/include/libxml2, -DLIBXML2_LIBRARIES=/home/juan/common/lib/libxml2.so, -DUUID_INCLUDE_DIR=/home/juan/common/include, -DUUID_LIBRARY=/home/juan/common/lib/libuuid.so, -DCMAKE_EXE_LINKER_FLAGS=-L/home/juan/common/lib’
Does anyone how I can configure the "build-script" properly? I am desperate [] .
I would appreciate any kind of help very much [] .
Best regards,
Juan