Skip to content
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

Checking for library containing lua_load... no #79

Closed
Serjsk8 opened this issue Feb 18, 2014 · 9 comments
Closed

Checking for library containing lua_load... no #79

Serjsk8 opened this issue Feb 18, 2014 · 9 comments

Comments

@Serjsk8
Copy link

Serjsk8 commented Feb 18, 2014

Hello
I'm trying to compile In FreeBSD 10

FreeBSD fbsd 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Fri Jan 17 01:46:25 UTC 2014

Clone GitHub Repository

$ git clone https://github.com/vysheng/tg.git && cd tg

Install these ports:
devel/libconfig
devel/libexecinfo

Then build:

$ env CC=clang CFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib LUA=/usr/local/bin/lua51/lua LUA_LIB=-l/usr/local/lib/lua51 ./configure

And I have this:

checking for gcc... clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking for sqrt in -lm... yes
checking for library containing clock_gettime... none required
checking for library containing backtrace... -lexecinfo
checking for inflate in -lz... yes
checking for AES_set_encrypt_key in -lcrypto... yes
checking for rl_save_prompt in -lreadline... yes
checking for libconfig... enabled
checking for config_init in -lconfig... yes
checking for liblua... checking how to run the C preprocessor... clang -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
enabled
checking if /usr/local/bin/lua51/lua is a Lua interpreter... yes
checking for lua version... Hello Lua 5.1!
5.1
checking for lua platform... unknown
checking for lua script directory... ${prefix}/share/lua/5.1
checking for lua module directory... ${exec_prefix}/lib/lua/5.1
checking if LUA_VERSION is defined... yes
checking lua.h usability... no
checking lua.h presence... no
checking for lua.h... no
checking lualib.h usability... no
checking lualib.h presence... no
checking for lualib.h... no
checking lauxlib.h usability... no
checking lauxlib.h presence... no
checking for lauxlib.h... no
checking luaconf.h usability... no
checking luaconf.h presence... no
checking for luaconf.h... no
checking for Lua headers in... /usr/local/include/lua51
checking lua.h usability... yes
checking lua.h presence... yes
checking for lua.h... yes
checking lualib.h usability... yes
checking lualib.h presence... yes
checking for lualib.h... yes
checking lauxlib.h usability... yes
checking lauxlib.h presence... yes
checking for lauxlib.h... yes
checking luaconf.h usability... yes
checking luaconf.h presence... yes
checking for luaconf.h... yes
checking for Lua header version... 5.1
checking if Lua header version matches 5.1... yes
checking if LUA_VERSION is defined... yes
checking for library containing lua_load... no
configure: error: cannot find libs for specified LUA_LIB

But I have Lua instaled:

# pkg version | grep lua
lua-5.1.5_6                        =
lua-mode.el-1.26_1                 =
lua52-5.2.3_2                      =

And

# ls /usr/local/lib/lua51/
liblua-5.1.so.1 liblua.a    liblua.so

Can You help me, pleas!

@Serjsk8 Serjsk8 mentioned this issue Feb 18, 2014
@lwhsu
Copy link
Contributor

lwhsu commented Feb 18, 2014

There are some mistakes in your build command, please try the stpes in #80.

@Serjsk8
Copy link
Author

Serjsk8 commented Feb 18, 2014

Thank you!
Now I was able to configure using lua-5.2
But I have the following error:

$ make
clang -I/usr/local/include -I/usr/local/include/lua52  -DHAVE_CONFIG_H -Wall -Wextra -Werror -Wno-deprecated -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -I. -I. -c interface.c -o interface.o
interface.c:1341:30: error: incompatible pointer types passing 'long *' to
      parameter of type 'const time_t *' (aka 'const int *')
      [-Werror,-Wincompatible-pointer-types]
  struct tm *tm = localtime (&t);
                             ^~
/usr/include/time.h:150:36: note: passing argument to parameter here
struct tm *localtime(const time_t *);
                                   ^
interface.c:1350:30: error: incompatible pointer types passing 'long *' to
      parameter of type 'const time_t *' (aka 'const int *')
      [-Werror,-Wincompatible-pointer-types]
  struct tm *tm = localtime (&t);
                             ^~
/usr/include/time.h:150:36: note: passing argument to parameter here
struct tm *localtime(const time_t *);
                                   ^
2 errors generated.
*** Error code 1

Stop.

@lwhsu
Copy link
Contributor

lwhsu commented Feb 18, 2014

It's fine here, are you with the latest copy of code?

@Serjsk8
Copy link
Author

Serjsk8 commented Feb 18, 2014

Yes,
I just tried to load the code again And I have the exact same error

$ make
clang -I/usr/local/include -I/usr/local/include/lua52  -DHAVE_CONFIG_H -Wall -Wextra -Werror -Wno-deprecated -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -I. -I. -c main.c -o main.o
clang -I/usr/local/include -I/usr/local/include/lua52  -DHAVE_CONFIG_H -Wall -Wextra -Werror -Wno-deprecated -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -I. -I. -c loop.c -o loop.o
clang -I/usr/local/include -I/usr/local/include/lua52  -DHAVE_CONFIG_H -Wall -Wextra -Werror -Wno-deprecated -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -I. -I. -c interface.c -o interface.o
interface.c:1341:30: error: incompatible pointer types passing 'long *' to
      parameter of type 'const time_t *' (aka 'const int *')
      [-Werror,-Wincompatible-pointer-types]
  struct tm *tm = localtime (&t);
                             ^~
/usr/include/time.h:150:36: note: passing argument to parameter here
struct tm *localtime(const time_t *);
                                   ^
interface.c:1350:30: error: incompatible pointer types passing 'long *' to
      parameter of type 'const time_t *' (aka 'const int *')
      [-Werror,-Wincompatible-pointer-types]
  struct tm *tm = localtime (&t);
                             ^~
/usr/include/time.h:150:36: note: passing argument to parameter here
struct tm *localtime(const time_t *);
                                   ^
2 errors generated.
*** Error code 1

Stop.
# pkg info libconfig 
libconfig-1.4.9
Name           : libconfig
Version        : 1.4.9
Installed on   : Tue Feb 18 16:50:12 YEKT 2014
Origin         : devel/libconfig
Architecture   : freebsd:10:x86:32
#pkg info libexecinfo
libexecinfo-1.1_3
Name           : libexecinfo
Version        : 1.1_3
Installed on   : Tue Feb 18 16:50:33 YEKT 2014
Origin         : devel/libexecinfo
Architecture   : freebsd:10:x86:32
# pkg info lua52
lua52-5.2.3_2
Name           : lua52
Version        : 5.2.3_2
Installed on   : Tue Feb 18 18:17:54 YEKT 2014
Origin         : lang/lua52
Architecture   : freebsd:10:x86:32

@vysheng
Copy link
Owner

vysheng commented Feb 18, 2014

Fixed this warning. BTW, do you have 32-bit system?

@Serjsk8
Copy link
Author

Serjsk8 commented Feb 18, 2014

yes, 32-bit

# uname -a
FreeBSD fbsd 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: 
Fri Jan 17 01:46:25 UTC 2014
root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC  i386

@Serjsk8
Copy link
Author

Serjsk8 commented Feb 18, 2014

I updated the code and now successfully build.
Thank you!

@vysheng vysheng closed this as completed Sep 10, 2014
@neofutur
Copy link

same problem here, trying to build on mageia and having liblua-devel install ( v 5.2 )

checking luaconf.h usability... yes
checking luaconf.h presence... yes
checking for luaconf.h... yes
checking for Lua header version... 5.2
checking if Lua header version matches 5.2... yes
checking if LUA_VERSION is defined... yes
checking for library containing exp... -lm
checking for library containing dlopen... -ldl
checking for library containing lua_load... no
configure: error: No lua libs found. Try --disable-liblua

@SGmuwa
Copy link

SGmuwa commented Dec 19, 2019

In my Ubuntu it helped:
env CC=clang CFLAGS=-I/usr/local/include LDFLAGS=-L/usr/lib LUA=/usr/bin/lua5.2 LUA_INCLUDE=-I/usr/include/lua5.2 LUA_LIB=-llua5.2 ./configure --disable-openssl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants