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

compile error #18

Closed
nosqldb opened this issue May 19, 2014 · 7 comments
Closed

compile error #18

nosqldb opened this issue May 19, 2014 · 7 comments

Comments

@nosqldb
Copy link

nosqldb commented May 19, 2014

[root@ccj zimg]# make
mkdir -p build/zimg
cd build/zimg; cmake /zimg/src; make; cp zimg /zimg/bin
Diabling SSL
Build Type: Release
Std CFLAGS:  -Wall -fno-strict-aliasing -DPROJECT_VERSION="2.0.0" -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112 -DEVHTP_DISABLE_SSL -DNDEBUG -DZIMG_VERSION=2.0.0 -DMAGICKCORE_HDRI_ENABLE -DMAGICKCORE_QUANTUM_DEPTH=16
Dbg CFLAGS: -g -Wall -fno-strict-aliasing -ggdb -DDEBUG -DZIMG_VERSION=2.0.0 -DMAGICKCORE_HDRI_ENABLE -DMAGICKCORE_QUANTUM_DEPTH=16
Rel CFLAGS: -O3 -DNDEBUG -Wall -fno-strict-aliasing -DZIMG_VERSION=2.0.0 -DMAGICKCORE_HDRI_ENABLE -DMAGICKCORE_QUANTUM_DEPTH=16
-- Configuring done
-- Generating done
-- Build files have been written to: /zimg/build/zimg
make[1]: Entering directory `/zimg/build/zimg'
make[2]: Entering directory `/zimg/build/zimg'
make[3]: Entering directory `/zimg/build/zimg'
make[3]: Leaving directory `/zimg/build/zimg'
make[3]: Entering directory `/zimg/build/zimg'
Linking C executable zimg
CMakeFiles/zimg.dir/main.c.o: In function `main':
main.c:(.text+0x716): undefined reference to `luaL_loadfilex'
main.c:(.text+0x732): undefined reference to `lua_pcallk'
main.c:(.text+0x747): undefined reference to `lua_getglobal'
main.c:(.text+0x776): undefined reference to `lua_getglobal'
main.c:(.text+0x7a5): undefined reference to `lua_getglobal'
main.c:(.text+0x7d4): undefined reference to `lua_getglobal'
main.c:(.text+0x803): undefined reference to `lua_getglobal'
CMakeFiles/zimg.dir/main.c.o:main.c:(.text+0x832): more undefined references to `lua_getglobal' follow
CMakeFiles/zimg.dir/main.c.o: In function `main':
main.c:(.text+0xdfb): undefined reference to `lua_tonumberx'
main.c:(.text+0xe43): undefined reference to `lua_tonumberx'
main.c:(.text+0xe93): undefined reference to `lua_tonumberx'
main.c:(.text+0xf33): undefined reference to `lua_tonumberx'
main.c:(.text+0xf5b): undefined reference to `lua_tonumberx'
CMakeFiles/zimg.dir/main.c.o:main.c:(.text+0xf83): more undefined references to `lua_tonumberx' follow
collect2: ld returned 1 exit status
make[3]: *** [zimg] Error 1
make[3]: Leaving directory `/zimg/build/zimg'
make[2]: *** [CMakeFiles/zimg.dir/all] Error 2
make[2]: Leaving directory `/zimg/build/zimg'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/zimg/build/zimg'
cp: cannot stat `zimg': No such file or directory
make: *** [all] Error 1
[root@ccj zimg]# gcc --version
gcc (GCC) 4.4.6 20120305 (Red Hat 4.4.6-4)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@buaazp
Copy link
Owner

buaazp commented May 19, 2014

lua 没找到,或者lua 版本不对吧,需要用lua 5.1

@nosqldb
Copy link
Author

nosqldb commented May 19, 2014

奇怪,有lua的,5.1.4和5.2.3的都报这个。

@buaazp
Copy link
Owner

buaazp commented May 19, 2014

为了避免这些奇奇怪怪的编译问题,我把lua集成进来了,现在不再依赖系统的lua库,应该不会编译失败了,你拉取最新版本再尝试一下~

@buaazp buaazp added the wontfix label May 19, 2014
@nosqldb
Copy link
Author

nosqldb commented May 19, 2014

最新master编译通过,运行时崩溃了。

./zimg conf/zimg.lua
*** glibc detected *** ./zimg: free(): invalid next size (fast): 0x0000000000f21c60 ***
======= Backtrace: =========
/lib64/libc.so.6[0x30674760e6]
/lib64/libc.so.6[0x3067478c13]
./zimg(conf_get_rules+0x221)[0x40a4c1]
./zimg(main+0xccf)[0x409d2f]
/lib64/libc.so.6(__libc_start_main+0xfd)[0x306741ecdd]
./zimg[0x408bb9]
======= Memory map: ========
00400000-00459000 r-xp 00000000 ca:00 1601413                            /zimg-master/bin/zimg
00659000-0065a000 rw-p 00059000 ca:00 1601413                            /zimg-master/bin/zimg
0065a000-0065b000 rw-p 00000000 00:00 0 
00f1f000-00f40000 rw-p 00000000 00:00 0                                  [heap]
3067000000-3067020000 r-xp 00000000 ca:00 31067                          /lib64/ld-2.12.so
306721f000-3067220000 r--p 0001f000 ca:00 31067                          /lib64/ld-2.12.so
3067220000-3067221000 rw-p 00020000 ca:00 31067                          /lib64/ld-2.12.so
3067221000-3067222000 rw-p 00000000 00:00 0 
3067400000-306758a000 r-xp 00000000 ca:00 31217                          /lib64/libc-2.12.so
306758a000-3067789000 ---p 0018a000 ca:00 31217                          /lib64/libc-2.12.so
3067789000-306778d000 r--p 00189000 ca:00 31217                          /lib64/libc-2.12.so
306778d000-306778e000 rw-p 0018d000 ca:00 31217                          /lib64/libc-2.12.so
306778e000-3067793000 rw-p 00000000 00:00 0 
3067800000-3067802000 r-xp 00000000 ca:00 31220                          /lib64/libdl-2.12.so
3067802000-3067a02000 ---p 00002000 ca:00 31220                          /lib64/libdl-2.12.so
3067a02000-3067a03000 r--p 00002000 ca:00 31220                          /lib64/libdl-2.12.so
3067a03000-3067a04000 rw-p 00003000 ca:00 31220                          /lib64/libdl-2.12.so
3067c00000-3067c17000 r-xp 00000000 ca:00 29495                          /lib64/libpthread-2.12.so
3067c17000-3067e17000 ---p 00017000 ca:00 29495                          /lib64/libpthread-2.12.so
3067e17000-3067e18000 r--p 00017000 ca:00 29495                          /lib64/libpthread-2.12.so
3067e18000-3067e19000 rw-p 00018000 ca:00 29495                          /lib64/libpthread-2.12.so
3067e19000-3067e1d000 rw-p 00000000 00:00 0 
3068000000-3068015000 r-xp 00000000 ca:00 29149                          /lib64/libz.so.1.2.3
3068015000-3068214000 ---p 00015000 ca:00 29149                          /lib64/libz.so.1.2.3
3068214000-3068215000 r--p 00014000 ca:00 29149                          /lib64/libz.so.1.2.3
3068215000-3068216000 rw-p 00015000 ca:00 29149                          /lib64/libz.so.1.2.3
3068800000-3068883000 r-xp 00000000 ca:00 32799                          /lib64/libm-2.12.so
3068883000-3068a82000 ---p 00083000 ca:00 32799                          /lib64/libm-2.12.so
3068a82000-3068a83000 r--p 00082000 ca:00 32799                          /lib64/libm-2.12.so
3068a83000-3068a84000 rw-p 00083000 ca:00 32799                          /lib64/libm-2.12.so
3068c00000-3068c07000 r-xp 00000000 ca:00 32795                          /lib64/librt-2.12.so
3068c07000-3068e06000 ---p 00007000 ca:00 32795                          /lib64/librt-2.12.so
3068e06000-3068e07000 r--p 00006000 ca:00 32795                          /lib64/librt-2.12.so
3068e07000-3068e08000 rw-p 00007000 ca:00 32795                          /lib64/librt-2.12.so
3069800000-3069816000 r-xp 00000000 ca:00 29157                          /lib64/libgcc_s-4.4.6-20120305.so.1
3069816000-3069a15000 ---p 00016000 ca:00 29157                          /lib64/libgcc_s-4.4.6-20120305.so.1
3069a15000-3069a16000 rw-p 00015000 ca:00 29157                          /lib64/libgcc_s-4.4.6-20120305.so.1
3069c00000-3069c02000 r-xp 00000000 ca:00 9109                           /usr/lib64/libXau.so.6.0.0
3069c02000-3069e02000 ---p 00002000 ca:00 9109                           /usr/lib64/libXau.so.6.0.0
3069e02000-3069e03000 rw-p 00002000 ca:00 9109                           /usr/lib64/libXau.so.6.0.0
306a000000-306a139000 r-xp 00000000 ca:00 4405                           /usr/lib64/libX11.so.6.3.0
306a139000-306a339000 ---p 00139000 ca:00 4405                           /usr/lib64/libX11.so.6.3.0
306a339000-306a33f000 rw-p 00139000 ca:00 4405                           /usr/lib64/libX11.so.6.3.0
306a800000-306a81b000 r-xp 00000000 ca:00 178                            /usr/lib64/libxcb.so.1.1.0
306a81b000-306aa1a000 ---p 0001b000 ca:00 178                            /usr/lib64/libxcb.so.1.1.0
306aa1a000-306aa1b000 rw-p 0001a000 ca:00 178                            /usr/lib64/libxcb.so.1.1.0
306ac00000-306ac25000 r-xp 00000000 ca:00 5006                           /usr/lib64/libpng12.so.0.49.0
306ac25000-306ae25000 ---p 00025000 ca:00 5006                           /usr/lib64/libpng12.so.0.49.0
306ae25000-306ae26000 rw-p 00025000 ca:00 5006                           /usr/lib64/libpng12.so.0.49.0
306c000000-306c010000 r-xp 00000000 ca:00 32818                          /lib64/libbz2.so.1.0.4
306c010000-306c20f000 ---p 00010000 ca:00 32818                          /lib64/libbz2.so.1.0.4
306c20f000-306c211000 rw-p 0000f000 ca:00 32818                          /lib64/libbz2.so.1.0.4
306cc00000-306cc26000 r-xp 00000000 ca:00 32814                          /lib64/libexpat.so.1.5.2
306cc26000-306ce25000 ---p 00026000 ca:00 32814                          /lib64/libexpat.so.1.5.2
306ce25000-306ce28000 rw-p 00025000 ca:00 32814                          /lib64/libexpat.so.1.5.2
3070000000-3070147000 r-xp 00000000 ca:00 4314                           /usr/lib64/libxml2.so.2.7.6
3070147000-3070346000 ---p 00147000 ca:00 4314                           /usr/lib64/libxml2.so.2.7.6
3070346000-3070350000 rw-p 00146000 ca:00 4314                           /usr/lib64/libxml2.so.2.7.6
3070350000-3070351000 rw-p 00000000 00:00 0 
7f3eead9f000-7f3eeada5000 rw-p 00000000 00:00 0 
7f3eeada5000-7f3eeadb2000 r-xp 00000000 ca:00 146                        /usr/lib64/libgomp.so.1.0.0
7f3eeadb2000-7f3eeafb1000 ---p 0000d000 ca:00 146                        /usr/lib64/libgomp.so.1.0.0
7f3eeafb1000-7f3eeafb2000 rw-p 0000c000 ca:00 146                        /usr/lib64/libgomp.so.1.0.0
7f3eeafb2000-7f3eeafb3000 rw-p 00000000 00:00 0 
7f3eeafb3000-7f3eeafe7000 r-xp 00000000 ca:00 9108                       /usr/lib64/libfontconfig.so.1.4.4
7f3eeafe7000-7f3eeb1e7000 ---p 00034000 ca:00 9108                       /usr/lib64/libfontconfig.so.1.4.4
7f3eeb1e7000-7f3eeb1e9000 rw-p 00034000 ca:00 9108                       /usr/lib64/libfontconfig.so.1.4.4
7f3eeb1e9000-7f3eeb1ea000 rw-p 00000000 00:00 0 
7f3eeb1ea000-7f3eeb20d000 r-xp 00000000 ca:00 1593                       /usr/lib64/libjpeg.so.62.0.0
7f3eeb20d000-7f3eeb40d000 ---p 00023000 ca:00 1593                       /usr/lib64/libjpeg.so.62.0.0
7f3eeb40d000-7f3eeb40e000 rw-p 00023000 ca:00 1593                       /usr/lib64/libjpeg.so.62.0.0
7f3eeb40e000-7f3eeb4a6000 r-xp 00000000 ca:00 534                        /usr/lib64/libfreetype.so.6.3.22
7f3eeb4a6000-7f3eeb6a5000 ---p 00098000 ca:00 534                        /usr/lib64/libfreetype.so.6.3.22
7f3eeb6a5000-7f3eeb6ab000 rw-p 00097000 ca:00 534                        /usr/lib64/libfreetype.so.6.3.22
7f3eeb6ab000-7f3eeb6ac000 rw-p 00000000 00:00 0 
7f3eeb6ac000-7f3eeba38000 r-xp 00000000 ca:00 332                        /usr/local/lib/libMagickCore-6.Q16.so.2.0.0
7f3eeba38000-7f3eebc38000 ---p 0038c000 ca:00 332                        /usr/local/lib/libMagickCore-6.Q16.so.2.0.0
7f3eebc38000-7f3eebd20000 rw-p 0038c000 ca:00 332                        /usr/local/lib/libMagickCore-6.Q16.so.2.0.0
7f3eebd20000-7f3eebd3a000 rw-p 00000000 00:00 0 
7f3eebd43000-7f3eebd45000 rw-p 00000000 00:00 0 
7f3eebd45000-7f3eebd58000 r-xp 00000000 ca:00 213721                     /usr/local/lib/libmemcached.so.6.0.0
7f3eebd58000-7f3eebf57000 ---p 00013000 ca:00 213721                     /usr/local/lib/libmemcached.so.6.0.0
7f3eebf57000-7f3eebf58000 rw-p 00012000 ca:00 213721                     /usr/local/lib/libmemcached.so.6.0.0
7f3eebf58000-7f3eec078000 r-xp 00000000 ca:00 213706                     /usr/local/lib/libMagickWand-6.Q16.so.2.0.0
7f3eec078000-7f3eec277000 ---p 00120000 ca:00 213706                     /usr/local/lib/libMagickWand-6.Q16.so.2.0.0
7f3eec277000-7f3eec27c000 rw-p 0011f000 ca:00 213706                     /usr/local/lib/libMagickWand-6.Q16.so.2.0.0
7f3eec27c000-7f3eec27e000 r-xp 00000000 ca:00 213690                     /usr/local/lib/libevent_pthreads-2.0.so.5.1.9
7f3eec27e000-7f3eec47d000 ---p 00002000 ca:00 213690                     /usr/local/lib/libevent_pthreads-2.0.so.5.1.9
7f3eec47d000-7f3eec47e000 rw-p 00001000 ca:00 213690                     /usr/local/lib/libevent_pthreads-2.0.so.5.1.9
7f3eec47e000-7f3eec47f000 rw-p 00000000 00:00 0 
7f3eec47f000-7f3eec4c3000 r-xp 00000000 ca:00 213675                     /usr/local/lib/libevent-2.0.so.5.1.9
7f3eec4c3000-7f3eec6c2000 ---p 00044000 ca:00 213675                     /usr/local/lib/libevent-2.0.so.5.1.9
7f3eec6c2000-7f3eec6c4000 rw-p 00043000 ca:00 213675                     /usr/local/lib/libevent-2.0.so.5.1.9
7f3eec6c4000-7f3eec6c5000 rw-p 00000000 00:00 0 
7fff41ed0000-7fff41ef1000 rw-p 00000000 00:00 0                          [stack]
7fff41ffe000-7fff42000000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
Aborted (core dumped)

@buaazp
Copy link
Owner

buaazp commented May 19, 2014

已知晓,暂时解决办法是把zimg.lua文件中的以下两行注释或删除掉,明天我会修复这个bug:

--download_rule="allow all"
--upload_rule="allow 127.0.0.1;deny all"

@buaazp
Copy link
Owner

buaazp commented May 20, 2014

Update:
bug已修复,麻烦跑一下看看可以了吗。

@buaazp buaazp added the bug label May 21, 2014
@buaazp
Copy link
Owner

buaazp commented May 21, 2014

Now zimg build and run successfully in both CI and real system. Close issue.

@buaazp buaazp closed this as completed May 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants