aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaquee <jaquee.monero@gmail.com>2017-02-07 20:10:17 +0100
committerJaquee <jaquee.monero@gmail.com>2017-02-11 19:41:23 +0100
commit20833579e92a6ffa3e574073e8b870bb19cff5d7 (patch)
treea0d0c86c270d8f4190e35ffc5a61528f12ab9475
parent08ceb5eba08d1e09224f8c0e8c5f5f375dbf9796 (diff)
downloadmonzero-gui-20833579e92a6ffa3e574073e8b870bb19cff5d7.tar.gz
monzero-gui-20833579e92a6ffa3e574073e8b870bb19cff5d7.tar.xz
monzero-gui-20833579e92a6ffa3e574073e8b870bb19cff5d7.zip
Linux: static libgcc and libstdc++
-rwxr-xr-xget_libwallet_api.sh28
-rwxr-xr-xlinuxdeploy_helper.sh12
-rw-r--r--monero-wallet-gui.pro9
3 files changed, 28 insertions, 21 deletions
diff --git a/get_libwallet_api.sh b/get_libwallet_api.sh
index 8d9dda28..ee04e6c8 100755
--- a/get_libwallet_api.sh
+++ b/get_libwallet_api.sh
@@ -143,7 +143,7 @@ elif [ "$platform" == "linux64" ]; then
echo "Configuring build for Android on Linux host"
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="armv7-a" -D ANDROID=true -D BUILD_GUI_DEPS=ON -D USE_LTO=OFF -D INSTALL_VENDORED_LIBUNBOUND=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
elif [ "$STATIC" == true ]; then
- cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
+ cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
else
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
fi
@@ -170,7 +170,7 @@ elif [ "$platform" == "linuxarmv7" ]; then
elif [ "$platform" == "linux" ]; then
echo "Configuring build for Linux general"
if [ "$STATIC" == true ]; then
- cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
+ cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
else
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
fi
@@ -219,21 +219,19 @@ if [ "$platform" != "mingw32" ] && [ "$ANDROID" != true ]; then
eval make -j$CPU_CORE_COUNT
eval make install -j$CPU_CORE_COUNT
popd
-else
- eval make -C $MONERO_DIR/build/release/contrib/epee all install
fi
-# unbound is one more dependency. can't be merged to the wallet_merged
-# since filename conflict (random.c.obj)
-# for Linux, we use libunbound shipped with the system, so we don't need to build it
+# build install epee
+eval make -C $MONERO_DIR/build/release/contrib/epee all install
+
+
+# Install libunwind
+echo "Installing libunbound..."
+pushd $MONERO_DIR/build/release/external/unbound
+# no need to make, it was already built as dependency for libwallet
+# make -j$CPU_CORE_COUNT
+$make_exec install -j$CPU_CORE_COUNT
+popd
-if [ "$platform" != "linux32" ] && ([ "$ANDROID" == true ] || [ "$platform" != "linux64" ]); then
- echo "Building libunbound..."
- pushd $MONERO_DIR/build/release/external/unbound
- # no need to make, it was already built as dependency for libwallet
- # make -j$CPU_CORE_COUNT
- $make_exec install -j$CPU_CORE_COUNT
- popd
-fi
popd
diff --git a/linuxdeploy_helper.sh b/linuxdeploy_helper.sh
index 7bd16d71..d65676ce 100755
--- a/linuxdeploy_helper.sh
+++ b/linuxdeploy_helper.sh
@@ -31,18 +31,22 @@ fi
# Copy dependencies
EXCLUDE='libstdc++|libgcc_s.so|libc.so|libpthread'
+INCLUDE='libunbound'
cp -rv $QT_DIR/qml $TARGET || exit
cp -rv $QT_DIR/plugins $TARGET || exit
mkdir -p $TARGET/libs || exit
-ldd $TARGET/$GUI_EXEC | grep "=> /" | awk '{print $3}' | grep -Ev $EXCLUDE | xargs -I '{}' cp -v '{}' $TARGET/libs || exit
-ldd $TARGET/plugins/platforms/libqxcb.so| grep "=> /" | awk '{print $3}' | grep -Ev $EXCLUDE | xargs -I '{}' cp -v '{}' $TARGET/libs || exit
-cp -v $QTXML_DIR/libQt5XmlPatterns.so.5 $TARGET/libs || exit
+#ldd $TARGET/$GUI_EXEC | grep "=> /" | awk '{print $3}' | grep $INCLUDE | xargs -I '{}' cp -v '{}' $TARGET/libs || exit
+#ldd $TARGET/$GUI_EXEC | grep "=> /" | awk '{print $3}' | grep -Ev $EXCLUDE | xargs -I '{}' cp -v '{}' $TARGET/libs || exit
+#ldd $TARGET/plugins/platforms/libqxcb.so| grep "=> /" | awk '{print $3}' | grep -Ev $EXCLUDE | xargs -I '{}' cp -v '{}' $TARGET/libs || exit
+#cp -v $QTXML_DIR/libQt5XmlPatterns.so.5 $TARGET/libs || exit
# Create start script
cat > $TARGET/start-gui.sh <<EOL
#!/bin/bash
-# export LD_LIBRARY_PATH=\`pwd\`/libs
+export LD_LIBRARY_PATH=\`pwd\`/libs
export QT_PLUGIN_PATH=\`pwd\`/plugins
export QML2_IMPORT_PATH=\`pwd\`/qml
./$GUI_EXEC
EOL
+
+chmod +x $TARGET/start-gui.sh \ No newline at end of file
diff --git a/monero-wallet-gui.pro b/monero-wallet-gui.pro
index 902a99b3..48d0af49 100644
--- a/monero-wallet-gui.pro
+++ b/monero-wallet-gui.pro
@@ -196,8 +196,13 @@ win32 {
linux {
CONFIG(static) {
message("using static libraries")
- LIBS+= -Wl,-Bstatic
+ LIBS+= -Wl,-Bstatic
+ QMAKE_LFLAGS += -static-libgcc -static-libstdc++
+ contains(QT_ARCH, x86_64) {
+ LIBS+= -lunbound
+ }
}
+
LIBS+= \
-lboost_serialization \
-lboost_thread \
@@ -210,7 +215,7 @@ linux {
-lssl \
-lcrypto \
-Wl,-Bdynamic \
- -ldl
+ -lGL
# currently monero has an issue with "static" build and linunwind-dev,
# so we link libunwind-dev only for non-Ubuntu distros
CONFIG(libunwind_off) {