Summary: | sci-mathematics/pymc-2.2 - /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib64/crt1.o: In function `_start': (.text+0x20): undefined reference to `main' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Luciano <luciano> |
Component: | Current packages | Assignee: | Benda Xu <heroxbd> |
Status: | RESOLVED TEST-REQUEST | ||
Severity: | normal | CC: | Jeffrey.Ratcliffe, jlec, pacho |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
emerge info
full build log newer ebuild (should go under sci-mathematics, not sci-chemistry) |
Please attach the entire build log to this bug report. Created attachment 358576 [details]
full build log
I've attached the build log
Please use fortran eclass for every fortran package. And please bump to newer python eclasses. I've tried an updated ebuild I made, which is attached (should go under sci-mathematics btw, not chemistry), but still having this problem: It appears that when I call setup.py by hand, it looks like this: /usr/bin/gfortran -Wall -Wall -shared build/temp.linux-x86_64-2.7/build/src.linux-x86_64-2.7/pymc/gp/linalg_utilsmodule.o build/temp.linux-x86_64-2.7/build/src.linux-x86_64-2.7/fortranobject.o build/temp.linux-x86_64-2.7/pymc/gp/linalg_utils.o build/temp.linux-x86_64-2.7/pymc/blas_wrap.o -L/usr/lib64 -L/usr/lib64 -llapack -lblas -lcblas -lblas -lpython2.7 -lgfortran -o build/lib.linux-x86_64-2.7/pymc/gp/linalg_utils.so ***note the '-shared' argument*** However, when built with portage, it executes the following: /usr/bin/gfortran -Wall -Wl,-O1 -Wl,--as-needed /tmp/portage/sci-mathematics/pymc-2.3.3/work/pymc-2.3.3-python2_7/temp.linux-x86_64-2.7/tmp/portage/sci-mathematics/pymc-2.3.3/work/pymc-2.3.3-python2_7/src.linux-x86_64-2.7/pymc/gp/linalg_utilsmodule.o /tmp/portage/sci-mathematics/pymc-2.3.3/work/pymc-2.3.3-python2_7/temp.linux-x86_64-2.7/tmp/portage/sci-mathematics/pymc-2.3.3/work/pymc-2.3.3-python2_7/src.linux-x86_64-2.7/fortranobject.o /tmp/portage/sci-mathematics/pymc-2.3.3/work/pymc-2.3.3-python2_7/temp.linux-x86_64-2.7/pymc/gp/linalg_utils.o /tmp/portage/sci-mathematics/pymc-2.3.3/work/pymc-2.3.3-python2_7/temp.linux-x86_64-2.7/pymc/blas_wrap.o -L/usr/lib64 -L/usr/lib64 -llapack -lblas -lcblas -lblas -lpython2.7 -lgfortran -o /tmp/portage/sci-mathematics/pymc-2.3.3/work/pymc-2.3.3-python2_7/lib/pymc/gp/linalg_utils.so Googling a bit seems to indicate that '-shared' missing compiler flag may be the problem, and explain missing 'main' errors. See for example, http://stackoverflow.com/questions/11116399/crt1-o-in-function-start-undefined-reference-to-main-in-linux I also had a look in the distutils-r1 eclass, and there are environment variables LDSHARED and LDCXXSHARED which are overriden (line 613). I assume these are for the C compile. However there isn't anything for the fortran compile, unless I'm mistaken. Could this be the source of the prob? Created attachment 383574 [details]
newer ebuild (should go under sci-mathematics, not sci-chemistry)
maybe this should be pushed a bit (if still wantinfg to keep this in the tree :/) 2.3.6 compiles ok for me |
Created attachment 358112 [details] emerge info I get the error shown below when emerging pymc-2.2. The strange thing is that if I unpack the source and run python setup.py config_fc --fcompiler gfortran build it compiles fine. I think it may be related to the fact that it's trying to build specifically for python 2.7 (I have 3.2 and 2.7 installed) I'd be greatful if you could help me find out why the ebuild is broken. ----------- /usr/bin/gfortran -Wall -Wl,-O1 -Wl,--as-needed build/temp.linux-x86_64-2.7/build/src.linux-x86_64-2.7/pymc/gp/linalg_utilsmodule.o build/temp.linux-x86_64-2.7/build/src.linux-x86_64-2.7/fortranobject.o build/temp.linux-x86_64-2.7/pymc/gp/linalg_utils.o build/temp.linux-x86_64-2.7/pymc/blas_wrap.o -L/usr/lib64 -L/usr/lib64 -llapack -lblas -lcblas -lblas -lpython2.7 -lgfortran -o build/lib.linux-x86_64-2.7/pymc/gp/linalg_utils.so /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib64/crt1.o: In function `_start': (.text+0x20): undefined reference to `main' collect2: ld returned 1 exit status /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib64/crt1.o: In function `_start': (.text+0x20): undefined reference to `main' collect2: ld returned 1 exit status error: Command "/usr/bin/gfortran -Wall -Wl,-O1 -Wl,--as-needed build/temp.linux-x86_64-2.7/build/src.linux-x86_64-2.7/pymc/gp/linalg_utilsmodule.o build/temp.linux-x86_64-2.7/build/src.linux-x86_64-2.7/fortranobject.o build/temp.linux-x86_64-2.7/pymc/gp/linalg_utils.o build/temp.linux-x86_64-2.7/pymc/blas_wrap.o -L/usr/lib64 -L/usr/lib64 -llapack -lblas -lcblas -lblas -lpython2.7 -lgfortran -o build/lib.linux-x86_64-2.7/pymc/gp/linalg_utils.so" failed with exit status 1 * ERROR: sci-mathematics/pymc-2.2 failed (compile phase): * Building failed * * Call stack: * ebuild.sh, line 93: Called src_compile * environment, line 3668: Called distutils_src_compile '--fcompiler=gnu95' * environment, line 1015: Called die * The specific snippet of code: * "$(PYTHON)" "${setup_file#*|}" "${_DISTUTILS_GLOBAL_OPTIONS[@]}" build "$@" || die "Building failed"; * * If you need support, post the output of `emerge --info '=sci-mathematics/pymc-2.2'`, * the complete build log and the output of `emerge -pqv '=sci-mathematics/pymc-2.2'`. * The complete build log is located at '/tmp/portage/sci-mathematics/pymc-2.2/temp/build.log'. * The ebuild environment file is located at '/tmp/portage/sci-mathematics/pymc-2.2/temp/environment'. * Working directory: '/tmp/portage/sci-mathematics/pymc-2.2/work/pymc-2.2' * S: '/tmp/portage/sci-mathematics/pymc-2.2/work/pymc-2.2' * Messages for package sci-mathematics/pymc-2.2: * ERROR: sci-mathematics/pymc-2.2 failed (compile phase): * Building failed * * Call stack: * ebuild.sh, line 93: Called src_compile * environment, line 3668: Called distutils_src_compile '--fcompiler=gnu95' * environment, line 1015: Called die * The specific snippet of code: * "$(PYTHON)" "${setup_file#*|}" "${_DISTUTILS_GLOBAL_OPTIONS[@]}" build "$@" || die "Building failed"; * * If you need support, post the output of `emerge --info '=sci-mathematics/pymc-2.2'`, * the complete build log and the output of `emerge -pqv '=sci-mathematics/pymc-2.2'`. * The complete build log is located at '/tmp/portage/sci-mathematics/pymc-2.2/temp/build.log'. * The ebuild environment file is located at '/tmp/portage/sci-mathematics/pymc-2.2/temp/environment'. * Working directory: '/tmp/portage/sci-mathematics/pymc-2.2/work/pymc-2.2' * S: '/tmp/portage/sci-mathematics/pymc-2.2/work/pymc-2.2' * * The following package has failed to build or install: * * (sci-mathematics/pymc-2.2::gentoo, ebuild scheduled for merge), Log file: * '/tmp/portage/sci-mathematics/pymc-2.2/temp/build.log' *