Giter Site home page Giter Site logo

Comments (3)

thezbyg avatar thezbyg commented on August 11, 2024

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.

thezbyg avatar thezbyg commented on August 11, 2024

Should be fixed in a8bc29c

from gpick.

Corin-EU avatar Corin-EU commented on August 11, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.