autogen.sh | 6 +- common/IoUtil.cpp | 1 common/Log.cpp | 4 - common/SpookyV2.h | 6 -- configure.ac | 1 ios/README | 22 ++++---- test/.gitignore | 7 +- test/Makefile.am | 142 +++++++++++++++++++++------------------------------- test/run_unit.sh.in | 10 +-- 9 files changed, 90 insertions(+), 109 deletions(-)
New commits: commit 199c6e2918e48283f724b31436576ec6c56537c3 Author: Tor Lillqvist <t...@collabora.com> AuthorDate: Mon May 27 10:09:49 2019 +0300 Commit: Tor Lillqvist <t...@collabora.com> CommitDate: Mon May 27 10:25:51 2019 +0300 Revert "Get rid of use of GNU libtool" and its follow-up The change causes problems for people on various sad distros. Oh well, whatever. This reverts commit bd00d9fd0576b8f249d2145d8570bc395d137dc1. This reverts commit 054a9cdb045a84c0d779ad47cbec0b11f28a4f06. Change-Id: Ie439e4c655d02b6f34bdd1a9c1c5b6db6048b653 diff --git a/autogen.sh b/autogen.sh index 051cdb3f9..f5043bec5 100755 --- a/autogen.sh +++ b/autogen.sh @@ -16,7 +16,11 @@ EOF exit 1 } -mkdir -p m4 +if test `uname -s` = Linux; then + libtoolize || failed "libtool" +elif test `uname -s` = Darwin; then + glibtoolize || failed "Can't find glibtoolize. For instance use the one from https://brew.sh, 'brew install libtool', or build GNU libtool yourself." +fi aclocal || failed "aclocal" diff --git a/common/IoUtil.cpp b/common/IoUtil.cpp index 3cb73ede7..b1ee058a5 100644 --- a/common/IoUtil.cpp +++ b/common/IoUtil.cpp @@ -33,6 +33,7 @@ #include "Log.hpp" #include "Util.hpp" +using Poco::Net::Socket; using Poco::Net::WebSocket; namespace IoUtil diff --git a/common/Log.cpp b/common/Log.cpp index 697765db8..5a0c2655d 100644 --- a/common/Log.cpp +++ b/common/Log.cpp @@ -109,10 +109,10 @@ namespace Log char* prefix(char* buffer, const std::size_t len, const char* level) { - const char *threadName = ::Util::getThreadName(); + const char *threadName = Util::getThreadName(); Poco::DateTime time; #ifdef __linux - const long osTid = ::Util::getThreadId(); + const long osTid = Util::getThreadId(); snprintf(buffer, len, "%s-%.05lu %.4u-%.2u-%.2u %.2u:%.2u:%.2u.%.6u [ %s ] %s ", (Source.getInited() ? Source.getId().c_str() : "<shutdown>"), osTid, diff --git a/common/SpookyV2.h b/common/SpookyV2.h index c081e89f6..bfda65f93 100644 --- a/common/SpookyV2.h +++ b/common/SpookyV2.h @@ -26,9 +26,6 @@ // slower than MD5. // -#ifndef INCLUDED_SPOOKYV2_H -#define INCLUDED_SPOOKYV2_H - #include <stddef.h> #ifdef _MSC_VER @@ -298,4 +295,5 @@ private: uint8 m_remainder; // length of unhashed data stashed in m_data }; -#endif // INCLUDED_SPOOKYV2_H + + diff --git a/configure.ac b/configure.ac index 3f68a75c1..9fd6bfaee 100644 --- a/configure.ac +++ b/configure.ac @@ -4,6 +4,7 @@ AC_PREREQ([2.63]) AC_INIT([loolwsd], [master], [libreoffice@lists.freedesktop.org]) +LT_INIT([shared, disable-static, dlopen]) AM_INIT_AUTOMAKE([1.10 subdir-objects tar-pax -Wno-portability]) diff --git a/ios/README b/ios/README index 00f03dbd4..be2f1062f 100644 --- a/ios/README +++ b/ios/README @@ -44,17 +44,21 @@ where misan.local is the macOS machine where I build the app, and Then back to the Mac: As you were able to build LibreOffice in step 1, you must already have -GNU autoconf installed on the Mac. Install also GNU automake. -Preferrably from sources, to make sure a potential installation of -brew or similar will not pollute your environment with unknown stuff. +GNU autoconf installed on the Mac. Install also GNU automake and +libtool. Preferrably from sources, to make sure a potential +installation of brew or similar will not pollute your environment with +unknown stuff. -Installing autoconf and automake in the default /usr/local, which is -in $PATH, is not really risky. (Unlike some other GNUish tools, like -libtool and pkg-config, which might mess up your LibreOffice build.) +As GNU libtool will be needed only for a very minimal part of the +build (running the autogen.sh script, but not anything else), it's +safest to install it somewhere that is not in your $PATH. Let's say +/opt/libtool. (Installing Automake in the default /usr/local, which is +in $PATH, is less risky.) -Run the autogen.sh script in the app folder: +Run the autogen.sh script in the app folder, with GNU libtool +available: -./autogen.sh +PATH=/opt/libtool/bin:$PATH ./autogen.sh OR: @@ -62,7 +66,7 @@ OR: Then: -brew install npm +brew install libtool npm ./autogen.sh sudo python -m ensurepip --default-pip sudo pip install polib lxml diff --git a/test/.gitignore b/test/.gitignore index 07be0a923..3a7e5fe74 100644 --- a/test/.gitignore +++ b/test/.gitignore @@ -4,10 +4,9 @@ Makefile Makefile.in *.log *.trs -*.so +.libs +*.la +*.lo *.o -fakesockettest test run_unit.sh -WsdSources.cpp -Ssl.cpp diff --git a/test/Makefile.am b/test/Makefile.am index 825365f00..f1f43aee9 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -9,22 +9,23 @@ check_PROGRAMS = test fakesockettest noinst_PROGRAMS = test fakesockettest unittest -AM_CXXFLAGS = -fPIC -DPIC $(CPPUNIT_CFLAGS) -DTDOC=\"$(top_srcdir)/test/data\" \ +AM_CXXFLAGS = $(CPPUNIT_CFLAGS) -DTDOC=\"$(top_srcdir)/test/data\" \ -I${top_srcdir}/common -I${top_srcdir}/net -I${top_srcdir}/wsd -I${top_srcdir}/kit -noinst_PROGRAMS += \ - unit-convert.so unit-typing.so \ - unit-timeout.so unit-prefork.so \ - unit-storage.so unit-client.so \ - unit-admin.so unit-tilecache.so \ - unit-fuzz.so unit-oob.so unit-http.so unit-oauth.so \ - unit-wopi.so unit-wopi-saveas.so \ - unit-wopi-ownertermination.so unit-wopi-versionrestore.so \ - unit-wopi-documentconflict.so unit_wopi_renamefile.so \ - unit-wopi-loadencoded.so +noinst_LTLIBRARIES = \ + unit-convert.la unit-typing.la \ + unit-timeout.la unit-prefork.la \ + unit-storage.la unit-client.la \ + unit-admin.la unit-tilecache.la \ + unit-fuzz.la unit-oob.la unit-http.la unit-oauth.la \ + unit-wopi.la unit-wopi-saveas.la \ + unit-wopi-ownertermination.la unit-wopi-versionrestore.la \ + unit-wopi-documentconflict.la unit_wopi_renamefile.la \ + unit-wopi-loadencoded.la -AM_LDFLAGS = -pthread $(ZLIB_LIBS) +MAGIC_TO_FORCE_SHLIB_CREATION = -rpath /dummy +AM_LDFLAGS = -pthread -module $(MAGIC_TO_FORCE_SHLIB_CREATION) $(ZLIB_LIBS) if ENABLE_SSL AM_LDFLAGS += -lssl -lcrypto @@ -55,24 +56,15 @@ wsd_sources = \ ../common/Unit.cpp \ ../net/Socket.cpp - -WsdSources.cpp : - for F in $(wsd_sources); do \ - echo '#include "'$$F'"'; \ - done >WsdSources.cpp - -Ssl.cpp : - echo '#include "../net/Ssl.cpp"' >Ssl.cpp +if ENABLE_SSL +wsd_sources += ../net/Ssl.cpp +endif test_base_source = \ TileQueueTests.cpp \ WhiteBoxTests.cpp \ DeltaTests.cpp \ - WsdSources.cpp - -if ENABLE_SSL -test_base_source += Ssl.cpp -endif + $(wsd_sources) test_all_source = \ $(test_base_source) \ @@ -94,54 +86,36 @@ fakesockettest_SOURCES = fakesockettest.cpp ../net/FakeSocket.cpp fakesockettest_LDADD = $(CPPUNIT_LIBS) # unit test modules: -unit_oob_so_SOURCES = UnitOOB.cpp -unit_oob_so_LDFLAGS = -shared -unit_http_so_SOURCES = UnitHTTP.cpp -unit_http_so_LDFLAGS = -shared -unit_fuzz_so_SOURCES = UnitFuzz.cpp -unit_fuzz_so_LDFLAGS = -shared -unit_admin_so_SOURCES = UnitAdmin.cpp -unit_admin_so_LDFLAGS = -shared -unit_admin_so_LDADD = $(CPPUNIT_LIBS) -unit_client_so_SOURCES = UnitClient.cpp ${test_all_source} -unit_client_so_LDFLAGS = -shared -unit_client_so_LDADD = $(CPPUNIT_LIBS) -unit_typing_so_SOURCES = UnitTyping.cpp -unit_typing_so_LDFLAGS = -shared -unit_typing_so_LDADD = $(CPPUNIT_LIBS) -unit_convert_so_SOURCES = UnitConvert.cpp -unit_convert_so_LDFLAGS = -shared -unit_timeout_so_SOURCES = UnitTimeout.cpp -unit_timeout_so_LDFLAGS = -shared -unit_prefork_so_SOURCES = UnitPrefork.cpp -unit_prefork_so_LDFLAGS = -shared -unit_storage_so_SOURCES = UnitStorage.cpp -unit_storage_so_LDFLAGS = -shared -unit_tilecache_so_SOURCES = UnitTileCache.cpp -unit_tilecache_so_LDFLAGS = -shared -unit_oauth_so_SOURCES = UnitOAuth.cpp -unit_oauth_so_LDFLAGS = -shared $(CPPUNIT_LIBS) -unit_wopi_so_SOURCES = UnitWOPI.cpp -unit_wopi_so_LDFLAGS = -shared -unit_wopi_so_LDADD = $(CPPUNIT_LIBS) -unit_wopi_saveas_so_SOURCES = UnitWOPISaveAs.cpp -unit_wopi_saveas_so_LDFLAGS = -shared -unit_wopi_saveas_so_LDADD = $(CPPUNIT_LIBS) -unit_wopi_ownertermination_so_SOURCES = UnitWopiOwnertermination.cpp -unit_wopi_ownertermination_so_LDFLAGS = -shared -unit_wopi_ownertermination_so_LDADD = $(CPPUNIT_LIBS) -unit_wopi_versionrestore_so_SOURCES = UnitWOPIVersionRestore.cpp -unit_wopi_versionrestore_so_LDFLAGS = -shared -unit_wopi_versionrestore_so_LDADD = $(CPPUNIT_LIBS) -unit_wopi_documentconflict_so_SOURCES = UnitWOPIDocumentConflict.cpp -unit_wopi_documentconflict_so_LDFLAGS = -shared -unit_wopi_documentconflict_so_LDADD = $(CPPUNIT_LIBS) -unit_wopi_renamefile_so_SOURCES = UnitWOPIRenameFile.cpp -unit_wopi_renamefile_so_LDFLAGS = -shared -unit_wopi_renamefile_so_LDADD = $(CPPUNIT_LIBS) -unit_wopi_loadencoded_so_SOURCES = UnitWOPILoadEncoded.cpp -unit_wopi_loadencoded_so_LDFLAGS = -shared -unit_wopi_loadencoded_so_LDADD = $(CPPUNIT_LIBS) +unit_oob_la_SOURCES = UnitOOB.cpp +unit_http_la_SOURCES = UnitHTTP.cpp +unit_fuzz_la_SOURCES = UnitFuzz.cpp +unit_admin_la_SOURCES = UnitAdmin.cpp +unit_admin_la_LIBADD = $(CPPUNIT_LIBS) +unit_client_la_SOURCES = UnitClient.cpp ${test_all_source} +unit_client_la_LIBADD = $(CPPUNIT_LIBS) +unit_typing_la_SOURCES = UnitTyping.cpp +unit_typing_la_LIBADD = $(CPPUNIT_LIBS) +unit_convert_la_SOURCES = UnitConvert.cpp +unit_timeout_la_SOURCES = UnitTimeout.cpp +unit_prefork_la_SOURCES = UnitPrefork.cpp +unit_storage_la_SOURCES = UnitStorage.cpp +unit_tilecache_la_SOURCES = UnitTileCache.cpp +unit_oauth_la_SOURCES = UnitOAuth.cpp +unit_oauth_la_LIBADD = $(CPPUNIT_LIBS) +unit_wopi_la_SOURCES = UnitWOPI.cpp +unit_wopi_la_LIBADD = $(CPPUNIT_LIBS) +unit_wopi_saveas_la_SOURCES = UnitWOPISaveAs.cpp +unit_wopi_saveas_la_LIBADD = $(CPPUNIT_LIBS) +unit_wopi_ownertermination_la_SOURCES = UnitWopiOwnertermination.cpp +unit_wopi_ownertermination_la_LIBADD = $(CPPUNIT_LIBS) +unit_wopi_versionrestore_la_SOURCES = UnitWOPIVersionRestore.cpp +unit_wopi_versionrestore_la_LIBADD = $(CPPUNIT_LIBS) +unit_wopi_documentconflict_la_SOURCES = UnitWOPIDocumentConflict.cpp +unit_wopi_documentconflict_la_LIBADD = $(CPPUNIT_LIBS) +unit_wopi_renamefile_la_SOURCES = UnitWOPIRenameFile.cpp +unit_wopi_renamefile_la_LIBADD = $(CPPUNIT_LIBS) +unit_wopi_loadencoded_la_SOURCES = UnitWOPILoadEncoded.cpp +unit_wopi_loadencoded_la_LIBADD = $(CPPUNIT_LIBS) if HAVE_LO_PATH SYSTEM_STAMP = @SYSTEMPLATE_PATH@/system_stamp @@ -157,21 +131,21 @@ check-local: # FIXME 2: unit-oob.la fails with symbol undefined: # UnitWSD::testHandleRequest(UnitWSD::TestRequest, UnitHTTPServerRequest&, UnitHTTPServerResponse&) , -TESTS = unit-typing.so unit-convert.so unit-prefork.so unit-tilecache.so \ - unit-timeout.so unit-oauth.so unit-wopi.so unit-wopi-saveas.so \ - unit-wopi-ownertermination.so unit-wopi-versionrestore.so \ - unit-wopi-documentconflict.so unit_wopi_renamefile.so \ - unit-http.so \ - unit-wopi-loadencoded.so -# TESTS = unit-client.so -# TESTS += unit-admin.so -# TESTS += unit-storage.so +TESTS = unit-typing.la unit-convert.la unit-prefork.la unit-tilecache.la \ + unit-timeout.la unit-oauth.la unit-wopi.la unit-wopi-saveas.la \ + unit-wopi-ownertermination.la unit-wopi-versionrestore.la \ + unit-wopi-documentconflict.la unit_wopi_renamefile.la \ + unit-http.la \ + unit-wopi-loadencoded.la +# TESTS = unit-client.la +# TESTS += unit-admin.la +# TESTS += unit-storage.la else TESTS = ${top_builddir}/test/test endif -TEST_EXTENSIONS = .so -SO_LOG_DRIVER = ${top_srcdir}/test/run_unit.sh +TEST_EXTENSIONS = .la +LA_LOG_DRIVER = ${top_srcdir}/test/run_unit.sh EXTRA_DIST = data/delta-text.png data/delta-text2.png data/hello.odt data/hello.txt $(test_SOURCES) $(unittest_SOURCES) run_unit.sh diff --git a/test/run_unit.sh.in b/test/run_unit.sh.in index c95cf4d55..1b4312824 100755 --- a/test/run_unit.sh.in +++ b/test/run_unit.sh.in @@ -21,7 +21,7 @@ verbose='' print_help () { - echo "Usage: run_unit.sh --test-name <name.so> [OPTIONS]" + echo "Usage: run_unit.sh --test-name <name.la> [OPTIONS]" echo "Runs a specified unit test" echo "" echo " --log-file <file> Log output to this file - default /dev/stderr" @@ -51,8 +51,8 @@ echo echo "Running ${tst}" echo " $cmd_line" -# drop .so suffix -tst=`echo $tst | sed s/\.so//`; +# drop .la suffix +tst=`echo $tst | sed s/\.la//`; if test "z$tst" != "z" && test "z$CPPUNIT_TEST_NAME" != "z"; then # $tst is not empty, but $CPPUNIT_TEST_NAME is set, exit early if they @@ -134,7 +134,7 @@ else # newer unit tests. --o:ssl.cert_file_path="${abs_top_builddir}/etc/cert.pem" \ --o:ssl.ca_file_path="${abs_top_builddir}/etc/ca-chain.cert.pem" \ --o:admin_console.username=admin --o:admin_console.password=admin \ - --unitlib="${abs_top_builddir}/test/$tst.so" 2> "$tst_log"; then + --unitlib="${abs_top_builddir}/test/.libs/$tst.so" 2> "$tst_log"; then echo "Test $tst passed." echo ":test-result: PASS $tst" >> $test_output else @@ -150,7 +150,7 @@ else # newer unit tests. echo " --o:ssl.cert_file_path=\"${abs_top_builddir}/etc/cert.pem\" \\" echo " --o:ssl.ca_file_path=\"${abs_top_builddir}/etc/ca-chain.cert.pem\" \\" echo " --o:admin_console.username=admin --o:admin_console.password=admin \\" - echo " --unitlib=\"${abs_top_builddir}/test/$tst.so\"" + echo " --unitlib=\"${abs_top_builddir}/test/.libs/$tst.so\"" echo "" echo " $ less $tst_log # for detailed failure log files" echo "=============================================================" _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits