-
Notifications
You must be signed in to change notification settings - Fork 590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undefined reference errors on build. #3338
Comments
This may have resulted in mixing different versions of Lua and LGI. |
@sclu1034 -- lua -> /usr/bin/lua Thanks for the fast response! It's much appreciated. |
Oh, I just realized, this isn't the LGI step yet, just You're likely missing the latter, which is named |
@sclu1034 |
@sclu1034 So managed to make some progress but now I think I'm at the lgi step you mentioned. I get the error on The lgi check failed. Awesome needs lgi to run. Add AWESOME_IGNORE_LGI=1 to your environment to continue. make[3]: *** [CMakeFiles/lgi-check-run.dir/build.make:58: CMakeFiles/lgi-check-run] Error 1 make[2]: *** [CMakeFiles/Makefile2:702: CMakeFiles/lgi-check-run.dir/all] Error 2 make[1]: *** [Makefile:152: all] Error 2 make: *** [Makefile:15: cmake-build] Error 2 running
Thanks again! |
-- lua -> /usr/bin/lua |
Yeah, this now looks you're missing LGI. It's |
@sclu1034 Yes I saw that so I tried installing via luarocks, after multiple errors I just uninstalled and re-installed luarocks, installed lgi, tried to make awesome but got a "generating API documentation" error. I downgraded from lua 5.3 to 5.2 to work around the error but not I, again, get the "lgi not found" error when I try to make awesome, despite |
Do you have this error somewhere? |
Hi @Elv13 I upgraded again to lua 5.3.5 and re installed luarocks to see if I'll get the error again. Here it is: [ 81%] Generating API documentation Error: no suitable Lua interpreter found Error: supported versions are: 5.2 5.1 make[3]: *** [CMakeFiles/ldoc.dir/build.make:290: doc/index.html] Error 1 make[2]: *** [CMakeFiles/Makefile2:621: CMakeFiles/ldoc.dir/all] Error 2 make[1]: *** [Makefile:152: all] Error 2 make: *** [Makefile:15: cmake-build] Error 2 I saw the "Error: supported versions are: 5.2 5.1" line, that's why I downgraded my lua version. liblua.3-dev is also installed. lua and luarocks are installed per the luarocks wiki.
and the output for
AWESOME_DATA_PATH:PATH=/usr/local/share/awesome AWESOME_DOC_PATH:PATH=/usr/local/share/doc/awesome AWESOME_MAN_PATH:PATH=/usr/local/share/man AWESOME_XSESSION_PATH:PATH=/usr/local/share/xsessions BUSTED_EXECUTABLE:FILEPATH=/usr/bin/busted CMAKE_BUILD_TYPE:STRING= CMAKE_INSTALL_PREFIX:PATH=/usr/local COMPRESS_MANPAGES:BOOL=ON CONVERT_EXECUTABLE:FILEPATH=/usr/bin/convert CPACK_GENERATOR:STRING=DEB DO_COVERAGE:BOOL=OFF GENERATE_DOC:BOOL=ON GENERATE_MANPAGES:STRING=AUTO GIT_EXECUTABLE:FILEPATH=/usr/bin/git GZIP_EXECUTABLE:FILEPATH=/usr/bin/gzip LDOC_EXECUTABLE:FILEPATH=/usr/bin/ldoc LUACHECK_EXECUTABLE:FILEPATH=LUACHECK_EXECUTABLE-NOTFOUND LUA_EXECUTABLE:FILEPATH=/usr/local/bin/lua SYSCONFDIR:PATH=/usr/local/etc WITH_DBUS:STRING=AUTO XDG_CONFIG_DIR:PATH=/usr/local/etc/xdg dpkg_path:FILEPATH=/usr/bin/dpkg rpmbuild_path:FILEPATH=rpmbuild_path-NOTFOUND Thanks again for answering! |
That error doesn't look like it's generated by Awesome, at least to my knowledge. So my guess is that some part of the build process used Lua 5.2, while the rest tried to use 5.3. Due to the progress into the build process, my guess would be that LDoc is running 5.2, but I'm not sure. What I can offer is these commands that we use for our upcoming CI rework: sudo apt-get install --no-install-recommends \
asciidoctor \
cmake \
dbus-x11 \
gettext \
gir1.2-gtk-3.0 \
gir1.2-pango-1.0 \
git \
libdbus-1-dev \
libgirepository1.0-dev \
libnotify-bin \
libpango1.0-dev \
libstartup-notification0-dev \
libx11-xcb-dev \
libxcb-cursor-dev \
libxcb-icccm4-dev \
libxcb-keysyms1-dev \
libxcb-randr0-dev \
libxcb-shape0-dev \
libxcb-util0-dev \
libxcb-xfixes0-dev \
libxcb-xinerama0-dev \
libxcb-xkb-dev \
libxcb-xrm-dev \
libxcb-xtest0-dev \
libxdg-basedir-dev \
libxkbcommon-dev \
libxkbcommon-x11-dev \
xutils-dev \
liblua5.3-dev \
lua5.3
luarocks install lgi
luarocks install ldoc This might not be everything you need, since the CI offers some baseline dependencies, but it should cover the majority. |
@sclu1034 That did it! For whatever reason I had installed ldoc (and a few other things) by hand before finding out there was a build-dep. It seems that the version on the repos was oudated. I was also missing markdown. Thanks for your help, it's much appreciated. |
I will re-open this. I think some recent changes made this problem worst. Since many distro ships lua 5.4 and people are going to install lgi using luarocks more often, I think it is worth investing in the cmake files to be smarter. |
@Elv13 We have a check for lua5.4 in the cmake. What do you have in mind ? |
@ShayAgros The issue is not that something was running with an unsupported version. I assume the "smartness" that @Elv13 wants to add to the CMake files is to make sure that, in addition to the check for version support, everything runs on the same version and to provide an easy-to-understand error message if that's not the case. |
Hello,
After I cloned the repo and installed a few dependencies manually and the rest via (
apt build-dep awesome
) I try to runmake
and get this:`
Building…
[ 1%] Built target test-gravity
[ 4%] Built target generated_icons
[ 4%] Linking C executable lgi-check
/usr/bin/ld: CMakeFiles/lgi-check.dir/build-utils/lgi-check.c.o: in function `main':
lgi-check.c:(.text+0x1f): undefined reference to `luaL_newstate'
/usr/bin/ld: lgi-check.c:(.text+0x2f): undefined reference to `luaL_openlibs'
/usr/bin/ld: lgi-check.c:(.text+0x42): undefined reference to `luaL_loadstring'
/usr/bin/ld: lgi-check.c:(.text+0x6d): undefined reference to `lua_pcallk'
/usr/bin/ld: lgi-check.c:(.text+0x87): undefined reference to `lua_tolstring'
collect2: error: ld returned 1 exit status
make[3]: *** [CMakeFiles/lgi-check.dir/build.make:86: lgi-check] Error 1
make[2]: *** [CMakeFiles/Makefile2:8267: CMakeFiles/lgi-check.dir/all] Error 2
make[1]: *** [Makefile:152: all] Error 2
make: *** [Makefile:15: cmake-build] Error 2
`
I opened another issue earlier about a different error which was resolved after tweaking around with the lua modules, don't think they are related. Any help is greatly appreciated.
Thank you
The text was updated successfully, but these errors were encountered: