[Ubuntu 16.10 amd64] Build error liblzo2, (workaround available, waiting on review) #866

Open
ckorn opened this Issue Oct 17, 2016 · 10 comments

Comments

Projects
None yet
3 participants
Contributor

ckorn commented Oct 17, 2016

The build fails on Ubuntu 16.10 amd64.

[ 74%] Building C object lzodriver/CMakeFiles/lzocompress.dir/lzocompress.c.o
/«PKGBUILDDIR»/thirdparty/lzo/driver/lzocompress.c: In function 'main':
/«PKGBUILDDIR»/thirdparty/lzo/driver/lzocompress.c:51:3: warning: ignoring return value of 'fread', declared with attribute warn_unused_result [-Wunused-result]
   fread(src, 1, src_len, stdin);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 74%] Linking C executable ../bin/lzocompress
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/liblzo2.a(lzo1x_1.o): relocation R_X86_64_PC32 against symbol `memset@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value

This the entire build log:
http://zulu309.server4you.de/build/logs/opentoonz_1.1.1-1~getdeb2~yakkety-amd64-20161017-0303

//Just for my reference: https://paste.ubuntuusers.de/423188/

Collaborator

ideasman42 commented Oct 17, 2016

Could you enable -fPIC as suggested?

Collaborator

ideasman42 commented Oct 25, 2016

No reply in over a week. closing.

@ideasman42 ideasman42 closed this Oct 25, 2016

Contributor

caryoscelus commented Oct 28, 2016

I have a similar issue on debian sid.

Could you enable -fPIC as suggested?

Enable where? Error line suggests that fPIC should be enabled on system library if i read that correctly. It doesn't make sense to rebuild system lib. Compile guide mentions only tiff building. Do we actually need build all third-party packages?

/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/liblzo2.a(lzo_init.o): relocation R_X86_64_PC32 against symbol `__stack_chk_fail@@GLIBC_2.4' can not be used when making a shared object; recompile with -fPIC

@ideasman42 ideasman42 reopened this Oct 28, 2016

Collaborator

ideasman42 commented Oct 28, 2016

Try add -fPIC to CMAKE_C_FLAGS and CMAKE_CXX_FLAGS in CMakeCache.txt.

Contributor

caryoscelus commented Oct 28, 2016

Doesn't work. Tried adding it both manually and through cmake -DCMAKE_C_FLAGS="-fPIC" -DCMAKE_CXX_FLAGS="-fPIC" ../sources/

Collaborator

ideasman42 commented Nov 2, 2016

Seems this is an issue with the options used in building the systems liblzo.a, see related issue with xen: https://lists.xen.org/archives/html/xen-devel/2014-07/msg03859.html

You can workaround this by editing your CMakeCache.txt, replacing liblzo.a with liblzo.so.

As a fix/workaround, CMake can prefer the .so file, so developers on Linux wont need to make manual adjustments, see PR: #899

Contributor

caryoscelus commented Nov 2, 2016

This seems to fix it, thanks.

Contributor

ckorn commented Nov 6, 2016

The workaround works fine. Thanks.

When upstream has to fix it this bug can be closed.

@ideasman42 ideasman42 added OS: Linux and removed Needs Info labels Nov 6, 2016

Collaborator

ideasman42 commented Nov 6, 2016

@ckorn Ideally building should succeed without having to perform manual workarounds (for common Linux distros at least) - rather leave this open until building works out of the box.

@ideasman42 ideasman42 changed the title from [Ubuntu 16.10 amd64] Build error liblzo2.a(lzo1x_1.o): relocation R_X86_64_PC32 against symbol `memset@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC to [Ubuntu 16.10 amd64] Build error liblzo2, (workaround available, waiting on review) Nov 9, 2016

shun-iwasawa added a commit that referenced this issue Apr 12, 2017

Fix/Workaround for #866 (#899)
Resolves linking issue on Linux

manongjohn added a commit to jaros3/opentoonz that referenced this issue Jun 10, 2017

Merge w/ latest OT master (#1)
* ignoring qtcreator ide files

* CMake: add WITH_SYSTEM_LZO option

Allows to easily switch between using thirdparty libs.

* CMake: add WITH_SYSTEM_SUPERLU option

Fixes crash on Linux (reported multiple times): see #1021

* CMake: install lzo binaries on Linux

Fixes #591 (thanks to @blackwarthog for investigating)

* CMake: cleanup indentation

* TravisCI/Linux: Disable system superlu

Recent commit for Linux enabled by default,
good default for typical Linux installs, but not working for TravisCI.

* CMake: correct own error in FindSuperLU

* stop clang-format check in travis (#1041)

* fixes warnings when library and fxs folders don't exist

* Checks data sound is valid to save. Issue #957 (#971)

close #957

* remove can't save warning on untitled autosave (#990)

close #777

* Added new scrubbing options (#994)

* fix import scene

* fix flipconsole connection

* allow no trim on spritesheet (#1022)

* Fix for pixels only mode conflict too easily. (#1023)

* fix vector fill

* fix convert popup

* make filesystemwatcher optional (#1060)

* fix preview fx (#1073)

close #1072

* soapbubblefx update (#1076)

* added sound playback (#995)

* Fixed insert fx popup replace button size (#1013)

* CMake: remove duplicate library linking

Thanks @blackwarthog for pointing out

* Fix crash on level strip arrow key presses (#1027)

* Remove hard-coded lines around panels (#1053)

* Remove line around style editor, schematic and flipbook

* Allow border on docks- use QFrame (#1054)

* Pair field style #881 (#1034)

* Moved Pair Fields to qss

* Move level palette lines to qss (#1035)

* Add alpha-channel to title-bar icons

Adds an alpha-channel to titlebar icons, also cleans the corners for
improved theme compatibility

* add null pointer check (#1106)

* Fix error using malloc, then delete[]

* Resolve #1046, profile errors flooding stdout

* bokeh fx iwa

* small fix

* New Theme (#1043)

* Added a new dark theme

* Extend ffmpeg timeout (#1029)

* Fix path to textures, effects, brushes and templates (#1090)

* high-dpi monitor compatibility

* Fix/Workaround for #866 (#899)

Resolves linking issue on Linux

* updated opentoonz_1.0 to opentoonz_1.1 in the docs

* fix level placement

* Minimalist Theme (#1112)

* Introducing Astral themes

* add UseHighDpiPixmaps option

* fix #1156 which causes program to crash when expanding history

* change closest field to 999

* fix other panels for high dpi monitors

* revert travis to qt5.5 for osx build

* font size : replace point with pixel

* set info.plist for retina display

* Fixed changing name on change level type - new level popup (#1011)

* fixed changing name on change level type

* Allow importing files to project dialog box (#1037)

* Allow importing files to project dialog box

* remove Are You Sure? when closing without unsaved content. (#733)

* SoapBubbleFxIwa Improvement (#1175)

* fit thickness and center opacity

* loop and shift spectrum

* render mode

* Allow to cross compile for Windows with Linux/Mingw (part 1 of 3, preprocessor) (#1148)

* split _WIN32 and _MSC_VER, lowercase includes

* Fixed removed scene from startup (#998)

* Fixed removed scene in startup popup

* fixed unclickable scenes

* constant for scenes in list

* Fix playback stuck bug (#1025)

* set premultiply and added level name type

* fix ruler

* fix flipbook auto-resize

* fix viewer gadgets

* fix swatches (planeviewer)

* curve the seam of looped spectrum (#1190)

* create zerary fx node at clicked pos (#1191)

* Fixes on convert feature from NAA raster images to TLV (#1203)

* prevent the gap on anti-aliased

* add dpi settings

*  Allow to cross compile for Windows with Linux/Mingw (part 2 of 3, bugfixes) (#1149)

* #mingw #bug: place explicit instantiations on templates before first use

* #mingw #bug: remove API attributes from inline functions

* #mingw #bug: add 'static' attribute for local functions

* #mingw #bug: fix API attributes for splitSpeedInOutSegment

* #mingw #bug: replace strstream to stringstream

* #mingw #bug: remove cross references to plasticskeleton from tnzcore

* #mingw #bug: fix bug with order of initializaition of static variables

* #mingw #bug: fix glutInit

* fix pasteinto undo

* set all the file browsers non-modal

* remove CurrentOpenedBrowser based modality control

* use preference for premultiply option

* Allow to cross compile for Windows with Linux/Mingw (part 3 of 3, cmake) (#1150)

* #mingw #cmake: rules for native and cross compilation

* #mingw #cmake: fix CMakeLists.txt for using with MinGW under Windows

* #mingw #cmake: fix typo (BUILD_ENV_WIN -> BUILD_ENV_MSVC)

* fix #1151 deleted canvas.h (#1152)

* premult by default on png (#1217)

close #794

* Fix crash on camera scale 0 (#1219)

close #1178

* fix plastictool tooloption crash

* Fix for movement during screen pick (#1225)

* Don't allow throw() in destructors (#1182)

* FFmpeg timeout error fix (#1030)

* Fix Flipbook Crash (#1224)

close #1222

* Fix for Raster Level Tool Switch Crash (#1228)

* Fix for Raster Level Tool Switch Crash
 close #860

* fix filebrowser hierarchy

* Fix crash on arrows using eraser (#1221)

* Stop erase on imagechanged
close #1209

* Fix click area for inbetween (#1241)

* Fix for ffmpeg render same frames (#1234)

* Fix for ffmpeg/spritesheet render same frames

* XSheet Toolbar (#989)

* XSheet Toolbar Added

* Fix for pairfield drawing with new themes (#1246)

* Clean pairField drawing

* Move keyframe navigator to qss (#1244)

* Move keyframe navigator to qss

* Remove Old Themes (#1251)

close #1239

* fix show mov on render (#1254)

* V1.1.3 (#1255)

@manongjohn manongjohn referenced this issue in jaros3/opentoonz Jun 10, 2017

Closed

Merge w/ recently updated master (#1) #2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment