[arch-general] Failed to compile dnsmasq latest git version with `-DHAVE_LUASCRIPT' on Manjaro.
Hi, See the following: $ uname -a Linux Manjaro 5.3.7-2-MANJARO #1 SMP PREEMPT Tue Oct 22 18:56:05 UTC 2019 x86_64 GNU/Linux $ yay -S lua52 $ make COPTS="-DHAVE_DBUS -DHAVE_IDN -DHAVE_LUASCRIPT -DHAVE_CONNTRACK -DHAVE_DNSSEC" -j24 Package lua5.2 was not found in the pkg-config search path. Perhaps you should add the directory containing `lua5.2.pc' to the PKG_CONFIG_PATH environment variable Package 'lua5.2', required by 'virtual:world', not found Package lua5.2 was not found in the pkg-config search path. Perhaps you should add the directory containing `lua5.2.pc' to the PKG_CONFIG_PATH environment variable Package 'lua5.2', required by 'virtual:world', not found make[1]: Entering directory '/home/data/software/anti-gfw/dns/dnsmasq/dnsmasq.git/src' cc -o dnsmasq cache.o rfc1035.o util.o option.o forward.o network.o dnsmasq.o dhcp.o lease.o rfc2131.o netlink.o dbus.o bpf.o helper.o tftp.o log.o conntrack.o dhcp6.o rfc3315.o dhcp-common.o outpacket.o radv.o slaac.o auth.o ipset.o domain.o dnssec.o blockdata.o tables.o loop.o inotify.o poll.o rrfilter.o edns0.o arp.o crypto.o dump.o ubus.o metrics.o -ldbus-1 -lidn -lnetfilter_conntrack -lnfnetlink -lnettle -lhogweed -lgmp /usr/bin/ld: helper.o: in function `grab_extradata_lua.part.0': helper.c:(.text+0x3e): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0x52): undefined reference to `lua_setfield' /usr/bin/ld: helper.o: in function `create_helper': helper.c:(.text+0x308): undefined reference to `luaL_newstate' /usr/bin/ld: helper.c:(.text+0x317): undefined reference to `luaL_openlibs' /usr/bin/ld: helper.c:(.text+0x333): undefined reference to `luaL_loadfilex' /usr/bin/ld: helper.c:(.text+0x352): undefined reference to `lua_pcallk' /usr/bin/ld: helper.c:(.text+0x36d): undefined reference to `lua_tolstring' /usr/bin/ld: helper.c:(.text+0x3b1): undefined reference to `lua_settop' /usr/bin/ld: helper.c:(.text+0x3c4): undefined reference to `lua_getglobal' /usr/bin/ld: helper.c:(.text+0x3d5): undefined reference to `lua_type' /usr/bin/ld: helper.c:(.text+0x3ef): undefined reference to `lua_settop' /usr/bin/ld: helper.c:(.text+0x6e3): undefined reference to `lua_getglobal' /usr/bin/ld: helper.c:(.text+0x6f4): undefined reference to `lua_type' /usr/bin/ld: helper.c:(.text+0x70e): undefined reference to `lua_settop' /usr/bin/ld: helper.c:(.text+0xbb0): undefined reference to `lua_getglobal' /usr/bin/ld: helper.c:(.text+0xbc1): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0xbd1): undefined reference to `lua_createtable' /usr/bin/ld: helper.c:(.text+0xc0a): undefined reference to `lua_pushnumber' /usr/bin/ld: helper.c:(.text+0xc22): undefined reference to `lua_setfield' /usr/bin/ld: helper.c:(.text+0xc3b): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0xc53): undefined reference to `lua_setfield' /usr/bin/ld: helper.c:(.text+0xc6c): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0xc84): undefined reference to `lua_setfield' /usr/bin/ld: helper.c:(.text+0xe7c): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0xe94): undefined reference to `lua_setfield' /usr/bin/ld: helper.c:(.text+0xebd): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0xed5): undefined reference to `lua_setfield' /usr/bin/ld: helper.c:(.text+0xeef): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0xf07): undefined reference to `lua_setfield' /usr/bin/ld: helper.c:(.text+0xf1f): undefined reference to `lua_callk' /usr/bin/ld: helper.c:(.text+0xf92): undefined reference to `lua_getglobal' /usr/bin/ld: helper.c:(.text+0xfa3): undefined reference to `lua_type' /usr/bin/ld: helper.c:(.text+0xfbd): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0xfcd): undefined reference to `lua_createtable' /usr/bin/ld: helper.c:(.text+0xfe7): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0xfff): undefined reference to `lua_setfield' /usr/bin/ld: helper.c:(.text+0x1010): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0x1028): undefined reference to `lua_setfield' /usr/bin/ld: helper.c:(.text+0x104a): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0x127d): undefined reference to `lua_getglobal' /usr/bin/ld: helper.c:(.text+0x128e): undefined reference to `lua_type' /usr/bin/ld: helper.c:(.text+0x12ac): undefined reference to `lua_callk' /usr/bin/ld: helper.c:(.text+0x13d0): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0x13e0): undefined reference to `lua_createtable' /usr/bin/ld: helper.c:(.text+0x13fa): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0x1412): undefined reference to `lua_setfield' /usr/bin/ld: helper.c:(.text+0x142c): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0x15bd): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0x15d5): undefined reference to `lua_setfield' /usr/bin/ld: helper.c:(.text+0x15fb): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0x1613): undefined reference to `lua_setfield' /usr/bin/ld: helper.c:(.text+0x162d): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0x1645): undefined reference to `lua_setfield' /usr/bin/ld: helper.c:(.text+0x165f): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0x1677): undefined reference to `lua_setfield' /usr/bin/ld: helper.c:(.text+0x16ea): undefined reference to `lua_getglobal' /usr/bin/ld: helper.c:(.text+0x16fb): undefined reference to `lua_type' /usr/bin/ld: helper.c:(.text+0x1750): undefined reference to `lua_pushnumber' /usr/bin/ld: helper.c:(.text+0x1768): undefined reference to `lua_setfield' /usr/bin/ld: helper.c:(.text+0x178d): undefined reference to `lua_callk' /usr/bin/ld: helper.c:(.text+0x1844): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0x185c): undefined reference to `lua_setfield' /usr/bin/ld: helper.c:(.text+0x188f): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0x18a7): undefined reference to `lua_setfield' collect2: error: ld returned 1 exit status make[1]: *** [/home/data/software/dnsmasq.git/Makefile:164: dnsmasq] Error 1 make[1]: Leaving directory '/home/data/software/dnsmasq.git/src' make: *** [Makefile:86: all] Error 2 How to solve this issue? -- Hongsheng Zhao <hongyi.zhao@gmail.com> Institute of Semiconductors, Chinese Academy of Sciences GnuPG DSA: 0xD108493
On Sat, 9 Nov 2019 at 06:28, Hongyi Zhao via arch-general <arch-general@archlinux.org> wrote:
Hi,
See the following:
$ uname -a Linux Manjaro 5.3.7-2-MANJARO #1 SMP PREEMPT Tue Oct 22 18:56:05 UTC 2019 x86_64 GNU/Linux
$ yay -S lua52
$ make COPTS="-DHAVE_DBUS -DHAVE_IDN -DHAVE_LUASCRIPT -DHAVE_CONNTRACK -DHAVE_DNSSEC" -j24 Package lua5.2 was not found in the pkg-config search path. Perhaps you should add the directory containing `lua5.2.pc' to the PKG_CONFIG_PATH environment variable Package 'lua5.2', required by 'virtual:world', not found Package lua5.2 was not found in the pkg-config search path. Perhaps you should add the directory containing `lua5.2.pc' to the PKG_CONFIG_PATH environment variable Package 'lua5.2', required by 'virtual:world', not found make[1]: Entering directory '/home/data/software/anti-gfw/dns/dnsmasq/dnsmasq.git/src' cc -o dnsmasq cache.o rfc1035.o util.o option.o forward.o network.o dnsmasq.o dhcp.o lease.o rfc2131.o netlink.o dbus.o bpf.o helper.o tftp.o log.o conntrack.o dhcp6.o rfc3315.o dhcp-common.o outpacket.o radv.o slaac.o auth.o ipset.o domain.o dnssec.o blockdata.o tables.o loop.o inotify.o poll.o rrfilter.o edns0.o arp.o crypto.o dump.o ubus.o metrics.o -ldbus-1 -lidn -lnetfilter_conntrack -lnfnetlink -lnettle -lhogweed -lgmp /usr/bin/ld: helper.o: in function `grab_extradata_lua.part.0': helper.c:(.text+0x3e): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0x52): undefined reference to `lua_setfield' /usr/bin/ld: helper.o: in function `create_helper': helper.c:(.text+0x308): undefined reference to `luaL_newstate' /usr/bin/ld: helper.c:(.text+0x317): undefined reference to `luaL_openlibs' /usr/bin/ld: helper.c:(.text+0x333): undefined reference to `luaL_loadfilex' /usr/bin/ld: helper.c:(.text+0x352): undefined reference to `lua_pcallk' /usr/bin/ld: helper.c:(.text+0x36d): undefined reference to `lua_tolstring' /usr/bin/ld: helper.c:(.text+0x3b1): undefined reference to `lua_settop' /usr/bin/ld: helper.c:(.text+0x3c4): undefined reference to `lua_getglobal' /usr/bin/ld: helper.c:(.text+0x3d5): undefined reference to `lua_type' /usr/bin/ld: helper.c:(.text+0x3ef): undefined reference to `lua_settop' /usr/bin/ld: helper.c:(.text+0x6e3): undefined reference to `lua_getglobal' /usr/bin/ld: helper.c:(.text+0x6f4): undefined reference to `lua_type' /usr/bin/ld: helper.c:(.text+0x70e): undefined reference to `lua_settop' /usr/bin/ld: helper.c:(.text+0xbb0): undefined reference to `lua_getglobal' /usr/bin/ld: helper.c:(.text+0xbc1): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0xbd1): undefined reference to `lua_createtable' /usr/bin/ld: helper.c:(.text+0xc0a): undefined reference to `lua_pushnumber' /usr/bin/ld: helper.c:(.text+0xc22): undefined reference to `lua_setfield' /usr/bin/ld: helper.c:(.text+0xc3b): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0xc53): undefined reference to `lua_setfield' /usr/bin/ld: helper.c:(.text+0xc6c): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0xc84): undefined reference to `lua_setfield' /usr/bin/ld: helper.c:(.text+0xe7c): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0xe94): undefined reference to `lua_setfield' /usr/bin/ld: helper.c:(.text+0xebd): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0xed5): undefined reference to `lua_setfield' /usr/bin/ld: helper.c:(.text+0xeef): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0xf07): undefined reference to `lua_setfield' /usr/bin/ld: helper.c:(.text+0xf1f): undefined reference to `lua_callk' /usr/bin/ld: helper.c:(.text+0xf92): undefined reference to `lua_getglobal' /usr/bin/ld: helper.c:(.text+0xfa3): undefined reference to `lua_type' /usr/bin/ld: helper.c:(.text+0xfbd): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0xfcd): undefined reference to `lua_createtable' /usr/bin/ld: helper.c:(.text+0xfe7): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0xfff): undefined reference to `lua_setfield' /usr/bin/ld: helper.c:(.text+0x1010): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0x1028): undefined reference to `lua_setfield' /usr/bin/ld: helper.c:(.text+0x104a): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0x127d): undefined reference to `lua_getglobal' /usr/bin/ld: helper.c:(.text+0x128e): undefined reference to `lua_type' /usr/bin/ld: helper.c:(.text+0x12ac): undefined reference to `lua_callk' /usr/bin/ld: helper.c:(.text+0x13d0): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0x13e0): undefined reference to `lua_createtable' /usr/bin/ld: helper.c:(.text+0x13fa): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0x1412): undefined reference to `lua_setfield' /usr/bin/ld: helper.c:(.text+0x142c): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0x15bd): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0x15d5): undefined reference to `lua_setfield' /usr/bin/ld: helper.c:(.text+0x15fb): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0x1613): undefined reference to `lua_setfield' /usr/bin/ld: helper.c:(.text+0x162d): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0x1645): undefined reference to `lua_setfield' /usr/bin/ld: helper.c:(.text+0x165f): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0x1677): undefined reference to `lua_setfield' /usr/bin/ld: helper.c:(.text+0x16ea): undefined reference to `lua_getglobal' /usr/bin/ld: helper.c:(.text+0x16fb): undefined reference to `lua_type' /usr/bin/ld: helper.c:(.text+0x1750): undefined reference to `lua_pushnumber' /usr/bin/ld: helper.c:(.text+0x1768): undefined reference to `lua_setfield' /usr/bin/ld: helper.c:(.text+0x178d): undefined reference to `lua_callk' /usr/bin/ld: helper.c:(.text+0x1844): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0x185c): undefined reference to `lua_setfield' /usr/bin/ld: helper.c:(.text+0x188f): undefined reference to `lua_pushstring' /usr/bin/ld: helper.c:(.text+0x18a7): undefined reference to `lua_setfield' collect2: error: ld returned 1 exit status make[1]: *** [/home/data/software/dnsmasq.git/Makefile:164: dnsmasq] Error 1 make[1]: Leaving directory '/home/data/software/dnsmasq.git/src' make: *** [Makefile:86: all] Error 2
How to solve this issue? -- Hongsheng Zhao <hongyi.zhao@gmail.com> Institute of Semiconductors, Chinese Academy of Sciences GnuPG DSA: 0xD108493
This mailing list is for arch, not manjao.
On Sat, 9 Nov 2019 at 06:28, Hongyi Zhao wrote:
$ yay -S lua52
Hi, even while the issue obviously is not caused by yay, you anyway shouldn't use an AUR helper, to install a package, neither from AUR, nor from Extra or any other repository, at least not when reporting bugs or asking for help. Assuming you are using Arch Linux (and not Manjaro) and assuming the dependency should be from Arch's Extra repository, use the official tool pacman to refresh the sync database, update all packages and to install the package, before sending a request to an Arch mailing list.
Package lua5.2 was not found in the pkg-config search path.
This is the culprit. Even if not related to an issue caused by using an AUR helper or probably a third party repositories, an install maintained by using an AUR helper and maybe Manjaro repositories might cause pitfalls, that could render help from this mailing list useless. Regards, Ralf
Am 09.11.19 um 08:42 schrieb Ralf Mardorf via arch-general: ...
Package lua5.2 was not found in the pkg-config search path.
...
Regards, Ralf
Hello, In this case the issue is a difference in packaging between debian and arch based distros. Debain provides lua5.2.pc as well as lua52.pc, while arch only has the latter. Lua itself does not provide any pkgconfig files, so those are added by the maintainers. If you use git packages, you should be able to detect such errors and create patches. $ pacman -Fl lua52 | grep pkgconfig lua52 usr/lib/pkgconfig/ lua52 usr/lib/pkgconfig/lua52.pc * https://packages.debian.org/bullseye/amd64/liblua5.2-dev/filelist /usr/lib/x86_64-linux-gnu/pkgconfig/lua-5.2-c++.pc /usr/lib/x86_64-linux-gnu/pkgconfig/lua-5.2.pc /usr/lib/x86_64-linux-gnu/pkgconfig/lua5.2-c++.pc /usr/lib/x86_64-linux-gnu/pkgconfig/lua5.2.pc /usr/lib/x86_64-linux-gnu/pkgconfig/lua52-c++.pc /usr/lib/x86_64-linux-gnu/pkgconfig/lua52.pc Regards, Andy
ProgAndy <admin@progandy.de> 于2019年11月9日周六 下午4:29写道:
Am 09.11.19 um 08:42 schrieb Ralf Mardorf via arch-general: ...
Package lua5.2 was not found in the pkg-config search path.
...
Regards, Ralf
Hello,
In this case the issue is a difference in packaging between debian and arch based distros. Debain provides lua5.2.pc as well as lua52.pc, while arch only has the latter.
Lua itself does not provide any pkgconfig files, so those are added by the maintainers.
If you use git packages, you should be able to detect such errors and create patches.
$ pacman -Fl lua52 | grep pkgconfig lua52 usr/lib/pkgconfig/ lua52 usr/lib/pkgconfig/lua52.pc
* https://packages.debian.org/bullseye/amd64/liblua5.2-dev/filelist /usr/lib/x86_64-linux-gnu/pkgconfig/lua-5.2-c++.pc /usr/lib/x86_64-linux-gnu/pkgconfig/lua-5.2.pc /usr/lib/x86_64-linux-gnu/pkgconfig/lua5.2-c++.pc /usr/lib/x86_64-linux-gnu/pkgconfig/lua5.2.pc /usr/lib/x86_64-linux-gnu/pkgconfig/lua52-c++.pc /usr/lib/x86_64-linux-gnu/pkgconfig/lua52.pc
Thanks a lot for pointing this out. I simply linked the usr/lib/pkgconfig/lua52.pc to usr/lib/pkgconfig/lua5.2.pc and it does the trick.
Regards, Andy
-- Hongsheng Zhao <hongyi.zhao@gmail.com> Institute of Semiconductors, Chinese Academy of Sciences GnuPG DSA: 0xD108493
participants (4)
-
Hongyi Zhao
-
Morgan Adamiec
-
ProgAndy
-
Ralf Mardorf