Bug 114102 - loolwsd fails to build in 32bit
Summary: loolwsd fails to build in 32bit
Status: NEW
Alias: None
Product: LibreOffice Online
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-27 19:55 UTC by Rene Engelhard
Modified: 2017-11-27 20:58 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
buildlog (15.81 KB, text/plain)
2017-11-27 19:56 UTC, Rene Engelhard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rene Engelhard 2017-11-27 19:55:44 UTC
Hi,

make[2]: Entering directory '/data/rene/tmp/online'
depbase=`echo common/Crypto.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
g++ -DHAVE_CONFIG_H -I.  -pthread -DLOOLWSD_DATADIR='"/usr/local/share/loolwsd"' -DLOOLWSD_CONFIGDIR='"/usr/local/etc/loolwsd"' -DDEBUG_ABSSRCDIR='"/home/rene/tmp/online"' -I./common -I./net -I./wsd -I./kit  -DNDEBUG -I/data/rene/tmp/online/bundled/include  -g -O2 -std=c++11 -Wall -Wextra -Werror -Wshadow -MT common/Crypto.o -MD -MP -MF $depbase.Tpo -c -o common/Crypto.o common/Crypto.cpp &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo wsd/Admin.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
g++ -DHAVE_CONFIG_H -I.  -pthread -DLOOLWSD_DATADIR='"/usr/local/share/loolwsd"' -DLOOLWSD_CONFIGDIR='"/usr/local/etc/loolwsd"' -DDEBUG_ABSSRCDIR='"/home/rene/tmp/online"' -I./common -I./net -I./wsd -I./kit  -DNDEBUG -I/data/rene/tmp/online/bundled/include  -g -O2 -std=c++11 -Wall -Wextra -Werror -Wshadow -MT wsd/Admin.o -MD -MP -MF $depbase.Tpo -c -o wsd/Admin.o wsd/Admin.cpp &&\
mv -f $depbase.Tpo $depbase.Po
In file included from ./common/LOOLWebSocket.hpp:20:0,
                 from ./common/Unit.hpp:17,
                 from ./net/WebSocketHandler.hpp:19,
                 from wsd/AdminModel.hpp:20,
                 from wsd/Admin.hpp:15,
                 from wsd/Admin.cpp:22:
./common/Protocol.hpp: In function 'std::__cxx11::string LOOLProtocol::getAbbreviatedMessage(const string&)':
./common/Protocol.hpp:285:93: error: no matching function for call to 'min(std::__cxx11::basic_string<char>::size_type, long unsigned int)'
         const auto pos = getDelimiterPosition(message.data(), std::min(message.size(), 500UL), '\n');

             ^
[...]
In file included from wsd/AdminModel.hpp:20:0,
                 from wsd/Admin.hpp:15,
                 from wsd/Admin.cpp:22:
./net/WebSocketHandler.hpp: In static member function 'static int WebSocketHandler::sendFrame(const std::shared_ptr<StreamSocket>&, const char*, size_t, unsigned char, bool)':
./net/WebSocketHandler.hpp:359:53: error: right shift count >= width of type [-Werror=shift-count-overflow]
             out.push_back(static_cast<char>((len >> 56) & 0xff));
                                                     ^~
./net/WebSocketHandler.hpp:360:53: error: right shift count >= width of type [-Werror=shift-count-overflow]
             out.push_back(static_cast<char>((len >> 48) & 0xff));
                                                     ^~
./net/WebSocketHandler.hpp:361:53: error: right shift count >= width of type [-Werror=shift-count-overflow]
             out.push_back(static_cast<char>((len >> 40) & 0xff));
                                                     ^~
./net/WebSocketHandler.hpp:362:53: error: right shift count >= width of type [-Werror=shift-count-overflow]
             out.push_back(static_cast<char>((len >> 32) & 0xff));
                                                     ^~
cc1plus: all warnings being treated as errors
Makefile:1198: recipe for target 'wsd/Admin.o' failed
make[2]: *** [wsd/Admin.o] Error 1
make[2]: Leaving directory '/data/rene/tmp/online'
Makefile:1762: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/data/rene/tmp/online'
Makefile:755: recipe for target 'all' failed
make: *** [all] Error 2

Also reproducible on master.

Will attach the full buildlog, too, but there's no surprises there.

Regards,

Rene
Comment 1 Rene Engelhard 2017-11-27 19:56:24 UTC
Created attachment 138024 [details]
buildlog
Comment 2 Rene Engelhard 2017-11-27 20:01:15 UTC
even with -Werror disabled, the first error ("500UL") remains - but the "bad" shifts (which then turn into a warning) shouldn't be ignored anyway, too
Comment 3 Aron Budea 2017-11-27 20:58:39 UTC
Confirmed.