matricks/bam

bam.lua : missing dependencies

Closed this issue · 3 comments

Here there are the bam.lua output on linux:


[44/44] #1 link bam
src/lua/loslib.o: In function 'os_tmpname':
/bam/bam/src/lua/loslib.c:60: warning: the use of 'tmpnam' is dangerous, better use 'mkstemp'
src/support.o: In function 'threads_create':
/bam/bam/src/support.c:230: undefined reference to 'pthread_create'
src/support.o: In function 'threads_join':
/bam/bam/src/support.c:236: undefined reference to 'pthread_join'
src/support.o: In function 'plugin_load':
/bam/bam/src/support.c:262: undefined reference to 'dlopen'
/bam/bam/src/support.c:265: undefined reference to 'dlerror'
/bam/bam/src/support.c:271: undefined reference to 'dlsym'
/bam/bam/src/support.c:272: undefined reference to 'dlerror'
/bam/bam/src/support.c:278: undefined reference to 'dlclose'
collect2: ld returned 1 exit status
bam: 'bam' error 256
bam: 'bam' removed because job updated it even it failed.
bam: error: a build step failed


Missing dependencies: -ldl -lpthread

It's look like s.cc.c_exe is nil.

Use s.cc.exe_c

if s.cc.exe_c == "gcc" then
    s.cc.flags:Add("-Wall", "-ansi", "-pedantic", "-O2", "-rdynamic")
    s.link.libs:Add("pthread")
    s.link.libs:Add("m")
    s.link.libs:Add("dl")
end

I justed removed the bam.lua file. No need to maintain that.