Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 401929 - media-libs/opencv-2.3.1a-r1 - ../lib64/crt1.o: In function `_start': (.text+0x20): undefined reference to `main'
Summary: media-libs/opencv-2.3.1a-r1 - ../lib64/crt1.o: In function `_start': (.text+0...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Andreas K. Hüttel
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-02 16:34 UTC by thomasg
Modified: 2012-04-16 01:04 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,12.58 KB, text/plain)
2012-02-02 16:35 UTC, thomasg
Details
emerge--info_opencv.txt (emerge--info_opencv.txt,13.23 KB, text/plain)
2012-02-02 16:36 UTC, thomasg
Details
emerge--info_opencv.txt (emerge--info_opencv.txt,12.97 KB, text/plain)
2012-02-02 16:58 UTC, thomasg
Details
verbose build.log (emerge_opencv_buildlog_verbose.txt,22.12 KB, text/plain)
2012-02-12 17:41 UTC, thomasg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description thomasg 2012-02-02 16:34:20 UTC
media-libs/opencv-2.3.1a-r1 fails to build with the following error:

Scanning dependencies of target pch_Generate_opencv_imgproc
[  0%] Generating precomp.hpp
[  0%] Generating precomp.hpp.gch/opencv_imgproc_Release.gch
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: ld returned 1 exit status
make[2]: *** [modules/imgproc/precomp.hpp.gch/opencv_imgproc_Release.gch] Error 1
make[1]: *** [modules/imgproc/CMakeFiles/pch_Generate_opencv_imgproc.dir/all] Error 2
make: *** [all]

For further details, see the attached log files.

Reproducible: Always
Comment 1 thomasg 2012-02-02 16:35:45 UTC
Created attachment 300763 [details]
build.log

Build log of failed build.
Comment 2 thomasg 2012-02-02 16:36:42 UTC
Created attachment 300765 [details]
emerge--info_opencv.txt

emerge --info
Comment 3 thomasg 2012-02-02 16:37:09 UTC
emerge -pqv '=media-libs/opencv-2.3.1a-r1' 
[ebuild  N    ] media-libs/opencv-2.3.1a-r1  USE="ffmpeg gstreamer gtk jpeg jpeg2k opengl png python qt4 sse sse2 tiff xine -cuda -doc -eigen -examples -ieee1394 -ipp -openexr -sse3 -ssse3 -v4l"
Comment 4 thomasg 2012-02-02 16:58:36 UTC
Created attachment 300767 [details]
emerge--info_opencv.txt

emerge --info
Comment 5 Ian Delaney (RETIRED) gentoo-dev 2012-02-07 11:20:51 UTC
archtester opencv # ebuild opencv-2.3.1a-r1.ebuild clean install

stopped at 19%

archtester opencv # grep "precomp\.hpp" /mnt/gen2/TmpDir/portage/media-libs/opencv-2.3.1a-r1/temp/build.log 

[  9%] Generating precomp.hpp
[  9%] Generating precomp.hpp.gch/opencv_highgui_Release.gch
[  9%] Generating precomp.hpp
[  9%] Generating precomp.hpp.gch/opencv_core_Release.gch
[  9%] [  9%] Generating precomp.hpp
[  9%] [  9%] Generating precomp.hpp
----------------------------------------------------
[ 14%] Generating test_precomp.hpp
[ 14%] Generating test_precomp.hpp.gch/opencv_test_video_Release.gch
[ 15%] Generating precomp.hpp
[ 15%] Generating precomp.hpp.gch/opencv_gpu_Release.gch
[ 15%] Generating test_precomp.hpp
[ 16%] Generating test_precomp.hpp.gch/opencv_test_gpu_Release.gch

continued to build.

archtester opencv # eix opencv

[I] media-libs/opencv
-------------------------------------------------
     Installed versions:  2.3.1a-r1(19:08:55 07/02/12)(gtk jpeg opengl png qt4 sse sse2 tiff -cuda -doc -eigen -examples -ffmpeg -gstreamer -ieee1394 -ipp -jpeg2

could not replicate
Comment 6 Andreas K. Hüttel archtester gentoo-dev 2012-02-12 16:12:20 UTC
Could you please try again with "CMAKE_VERBOSE=1 emerge ..."  and then attach the resulting log?!
Comment 7 thomasg 2012-02-12 17:41:15 UTC
Created attachment 301673 [details]
verbose build.log

Thanks for the hint, attached is the verbose buildlog.
Comment 8 Andreas K. Hüttel archtester gentoo-dev 2012-02-12 20:35:55 UTC
cd /var/tmp/portage/media-libs/opencv-2.3.1a-r1/work/opencv-2.3.1a_build/modules/imgproc && /usr/bin/x86_64-pc-linux-gnu-g++ -O3 -DNDEBUG -msse -msse2 -DNDEBUG -fPIC -I"/usr/lib64/python2.7/site-packages/numpy/core/include" -I"/var/tmp/portage/media-libs/opencv-2.3.1a-r1/work/OpenCV-2.3.1/." -I"/var/tmp/portage/media-libs/opencv-2.3.1a-r1/work/opencv-2.3.1a_build" -I"/var/tmp/portage/media-libs/opencv-2.3.1a-r1/work/OpenCV-2.3.1/include" -I"/var/tmp/portage/media-libs/opencv-2.3.1a-r1/work/OpenCV-2.3.1/include/opencv" -I"/var/tmp/portage/media-libs/opencv-2.3.1a-r1/work/OpenCV-2.3.1/modules/imgproc/include" -I"/var/tmp/portage/media-libs/opencv-2.3.1a-r1/work/OpenCV-2.3.1/modules/imgproc/src" -I"/var/tmp/portage/media-libs/opencv-2.3.1a-r1/work/opencv-2.3.1a_build/modules/imgproc" -I"/var/tmp/portage/media-libs/opencv-2.3.1a-r1/work/OpenCV-2.3.1/modules/imgproc/../core/include" -DPYTHON_USE_NUMPY=1 -DHAVE_QT -DHAVE_QT_OPENGL -DHAVE_CVCONFIG_H -DCVAPI_EXPORTS -DPYTHON_USE_NUMPY=1 -DHAVE_QT -DHAVE_QT_OPENGL -DHAVE_CVCONFIG_H -O0 -pipe -march=amdfam10 -g -Wl,-O1 -Wl,--as-needed -Wall -Wno-long-long -pthread -ffunction-sections -x c++-header -o /var/tmp/portage/media-libs/opencv-2.3.1a-r1/work/opencv-2.3.1a_build/modules/imgproc/precomp.hpp.gch/opencv_imgproc_Release.gch /var/tmp/portage/media-libs/opencv-2.3.1a-r1/work/opencv-2.3.1a_build/modules/imgproc/precomp.hpp

OK I'm not really an expert concerning precompiled header files, but it's kind of odd that linker flags are passed in that command...
Comment 9 Andreas K. Hüttel archtester gentoo-dev 2012-04-15 21:42:51 UTC
Could you please attach your make.conf ?!
Comment 10 thomasg 2012-04-16 01:04:24 UTC
(In reply to comment #9)
> Could you please attach your make.conf ?!

Hi Andreas,

before posting the make.conf, I tried a build again - and now it works...
OpenCV had a bump to -r2 which builds fine, but even the formerly problematic -r1 builds now.

Unfortunately in the mean time there have been several important changes on my system, so I can't really reproduce it.
1) Kernel Upgrade to 3.3.1
2) automake to 1.11.3
3) portage -> multilib-portage
4) general system update (nothing to the build toolchain besides 2 though)

The rest of the build toolchain has not changed, so it might, or might not be any of the mentioned software changes.
Unfortunately I don't have the non-working state of the system as a backup, so I don't think I will be able to reproduce this one properly. Fortunately though, it works now :)

Thanks for your help and sorry for the effort, but as far as I'm concerned, this is RESOLVED now, so I'm setting this bug to FIXED, as nobody else seems to have had this problem.