Comments (3)
Hi,
most likely this is due to switch to C++ Lua library variant in 892a81e.
Linker errors are caused by Lua function declarations using C++ linkage when Lua library exports C style functions.
Debian based distributions have this patch: https://sources.debian.org/patches/lua5.4/5.4.2-2/0003-extern_C.patch/
Without this patch, all Lua header inclusions must be wrapped in extern "C" { }
block when used from C++ code. I will restore these blocks.
GCC 8.2 is too old and is missing some C++17 features. GCC 10 should work once Lua includes are fixed.
from gpick.
Should be fixed in a8bc29c
from gpick.
Thank you for looking at this problem.
opensuse 15.4
g++-10 (SUSE Linux) 10.4.0
latest gpick r.a8bc29c
I anticipated reporting back that all was now working, but I am still getting the same errors
[ 31%] Linking CXX executable tests
/usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: CMakeFiles/tests.dir/source/Converter.cpp.o: in function `Converter::serialize[abi:cxx11](ColorObject const&, ConverterSerializePosition const&)':
Converter.cpp:(.text+0x398): undefined reference to `lua_gettop'
/usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: Converter.cpp:(.text+0x3ed): undefined reference to `lua_createtable'
etc
So in the "build" sub-directory, I did a make VERBOSE=1
/usr/local/stow/Development/cmake-3.19.6/bin/cmake -E cmake_link_script CMakeFiles/tests.dir/link.txt --verbose=1
/usr/bin/g++-10 CMakeFiles/tests.dir/CMakeFiles/Version.cpp.o CMakeFiles/tests.dir/source/ColorList.cpp.o CMakeFiles/tests.dir/source/ColorObject.cpp.o CMakeFiles/tests.dir/source/Converter.cpp.o CMakeFiles/tests.dir/source/Converters.cpp.o CMakeFiles/tests.dir/source/ErrorCode.cpp.o CMakeFiles/tests.dir/source/EventBus.cpp.o CMakeFiles/tests.dir/source/FileFormat.cpp.o CMakeFiles/tests.dir/source/InternalConverters.cpp.o CMakeFiles/tests.dir/source/test/BinaryTreeQuantization.cpp.o CMakeFiles/tests.dir/source/test/Color.cpp.o CMakeFiles/tests.dir/source/test/Common.cpp.o CMakeFiles/tests.dir/source/test/Dynv.cpp.o CMakeFiles/tests.dir/source/test/DynvBinary.cpp.o CMakeFiles/tests.dir/source/test/EventBus.cpp.o CMakeFiles/tests.dir/source/test/FileFormat.cpp.o CMakeFiles/tests.dir/source/test/First.cpp.o CMakeFiles/tests.dir/source/test/Format.cpp.o CMakeFiles/tests.dir/source/test/InternalConverters.cpp.o CMakeFiles/tests.dir/source/test/Main.cpp.o CMakeFiles/tests.dir/source/test/Matrix.cpp.o CMakeFiles/tests.dir/source/test/OctreeColorQuantization.cpp.o CMakeFiles/tests.dir/source/test/Ref.cpp.o CMakeFiles/tests.dir/source/test/Result.cpp.o CMakeFiles/tests.dir/source/test/Scoped.cpp.o CMakeFiles/tests.dir/source/test/Script.cpp.o CMakeFiles/tests.dir/source/test/Span.cpp.o CMakeFiles/tests.dir/source/test/TextFileParser.cpp.o CMakeFiles/tests.dir/source/test/Vector.cpp.o CMakeFiles/gpick-color.dir/source/Color.cpp.o CMakeFiles/gpick-math.dir/source/math/BinaryTreeQuantization.cpp.o CMakeFiles/gpick-math.dir/source/math/Empty.cpp.o CMakeFiles/gpick-math.dir/source/math/OctreeColorQuantization.cpp.o CMakeFiles/gpick-dynv.dir/source/dynv/Binary.cpp.o CMakeFiles/gpick-dynv.dir/source/dynv/Map.cpp.o CMakeFiles/gpick-dynv.dir/source/dynv/Types.cpp.o CMakeFiles/gpick-dynv.dir/source/dynv/Variable.cpp.o CMakeFiles/gpick-dynv.dir/source/dynv/Xml.cpp.o CMakeFiles/gpick-lua.dir/source/lua/Color.cpp.o CMakeFiles/gpick-lua.dir/source/lua/ColorObject.cpp.o CMakeFiles/gpick-lua.dir/source/lua/Ref.cpp.o CMakeFiles/gpick-lua.dir/source/lua/Script.cpp.o CMakeFiles/gpick-parser.dir/source/parser/TextFile.cpp.o CMakeFiles/gpick-parser.dir/CMakeFiles/TextFileParser.cpp.o CMakeFiles/gpick-common.dir/source/common/Convert.cpp.o CMakeFiles/gpick-common.dir/source/common/Format.cpp.o CMakeFiles/gpick-common.dir/source/common/Ref.cpp.o CMakeFiles/gpick-common.dir/source/common/StringOrView.cpp.o -o tests /usr/lib64/libboost_unit_test_framework.so -lexpat -lm -pthread
which obviously gave the same error.
I then repeated the command and put a "-llua" at the very end, ie just after "-lm -pthread" and then there was no error and linking was successful.
So it would appear the error is somewhere in the CMakefile process and that the "lua" library dependency is not being added to the needed shared library link list for some reason (unlike back in v0.2.6).
from gpick.
Related Issues (20)
- Problem in paradise on arch.. HOT 1
- feature request. An other pallet HOT 1
- How do you mix colors? HOT 2
- Searching colors in palette HOT 3
- Cannot build or run gpick HOT 1
- Gpick gives wrong hex codes on Endeavour OS due to window transparency
- gpick v0.3 compil fail on Archlinux HOT 1
- No output when using `gpick -so`? HOT 1
- Colors displayed are incorrect
- scons looks for .version file in parent directory HOT 2
- NameError: name 'SCons' is not defined HOT 2
- README doesn't mention lua-c++ requirement HOT 2
- error: too many template arguments for class template 'Scoped' HOT 2
- Undefined symbols: dynv::types::xml::write HOT 1
- Segmentation fault on launch on Gentoo, Arch Linux and Ubuntu 22.04 HOT 1
- Can't adjust 'Saturation' & 'Lightness' using mouse in 'Scheme Generation'
- build fails with boost 1.84
- Webpage Layout Dont Export, Crashes GPick
- We need to talk about names
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gpick.