3d0c / imagio

Image Processing Web Service.
MIT License
90 stars 12 forks source link

build issue #1

Closed zhangpy closed 10 years ago

zhangpy commented 10 years ago

following 2.1 in readme.

libs/libopencv_core.a(system.cpp.o): In function cv::getTickCount()': system.cpp:(.text._ZN2cv12getTickCountEv+0xd): undefined reference toclock_gettime' collect2: ld returned 1 exit status cannot parse /tmp/imagio-build1385080150/github.com/3d0c/imagio/imgproc/_obj/cgo.o as ELF, Mach-O or PE /var/tmp/go-link-8bsfaP/000000.o: In function cv::getTickCount()': (.text._ZN2cv12getTickCountEv+0xd): undefined reference toclock_gettime' collect2: ld returned 1 exit status 6l: running g++ failed: unsuccessful exit status 0x100 cp: cannot stat `/tmp/imagio-build1385080150/github.com/3d0c/imagio/_obj/exe/a.out': No such file or directory

3d0c commented 10 years ago

Could You provide a bit more details of Your system: uname -a gcc -v /sbin/ldconfig -p | grep stdc++

Looks like You have missed some packages...

zhangpy commented 10 years ago

Here is my info


uname -a Linux zhangpy-u2 3.8.0-33-generic #48~precise1-Ubuntu SMP Thu Oct 24 16:28:06 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux


gcc -v COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)


/sbin/ldconfig -p | grep stdc++ libstdc++.so.6 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 libstdc++.so.6 (libc6) => /usr/lib/i386-linux-gnu/libstdc++.so.6 libstdc++.so.5 (libc6) => /usr/lib/i386-linux-gnu/libstdc++.so.5


And I use the latest go version go1.2rc5 linux/amd64

zhangpy commented 10 years ago

I switch to 1.1.2 and build again. but no lucky.


~/imageio:$ ./build-static.sh libs/libopencv_core.a(system.cpp.o): In function cv::getTickCount()': system.cpp:(.text._ZN2cv12getTickCountEv+0xd): undefined reference toclock_gettime' collect2: ld returned 1 exit status cannot parse /tmp/imagio-build1385218441/github.com/3d0c/imagio/imgproc/_obj/cgo.o as ELF, Mach-O or PE go tool 6g: fork/exec /usr/local/go/pkg/tool/linux_amd64/6g: cannot allocate memory go tool pack: fork/exec /usr/local/go/pkg/tool/linux_amd64/pack: cannot allocate memory go tool 6l: fork/exec /usr/local/go/pkg/tool/linux_amd64/6l: cannot allocate memory cp: cannot stat `/tmp/imagio-build1385218441/github.com/3d0c/imagio/_obj/exe/a.out': No such file or directory

3d0c commented 10 years ago

Switched from what version? Could You try go 1.2?

zhangpy commented 10 years ago

switch from 1.2rc5. please refer to my first report in the loop. On Nov 23, 2013 11:26 PM, "alex" notifications@github.com wrote:

Switched from what version? Could You try go 1.2?

— Reply to this email directly or view it on GitHubhttps://github.com/3d0c/imagio/issues/1#issuecomment-29134335 .

3d0c commented 10 years ago

Try to add -lrt to the end lines 66 and 72, where g++ is invoked. Or just get this gist

zhangpy commented 10 years ago

"add -lrt" works! Thank you for the quick fix. by the way the gist fails to set LRT variable in line 16,17.

3d0c commented 10 years ago

Thanks for report. I'll fix build-static.sh in the release files.