Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 469420 - sci-libs/mathgl-2.1.2 - .../work/mathgl-2.1.2_build/lang/mathgl PYTHON_wrap.cxx:3106:31: fatal error: numpy/arrayobject.h: No such file or directory
Summary: sci-libs/mathgl-2.1.2 - .../work/mathgl-2.1.2_build/lang/mathgl PYTHON_wrap.c...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Andrey Grozin
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-11 11:51 UTC by Anton Kochkov
Modified: 2013-10-15 15:00 UTC (History)
3 users (show)

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


Attachments
Full build log (mathgl-build.log,162.41 KB, text/plain)
2013-05-11 11:51 UTC, Anton Kochkov
Details
emerge --info output (emerge_info.log,4.92 KB, text/plain)
2013-05-11 11:51 UTC, Anton Kochkov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Kochkov 2013-05-11 11:51:19 UTC
Created attachment 347978 [details]
Full build log

Can't determine exact error:

[31m[1mLinking CXX executable udav
[0mcd /var/tmp/portage/sci-libs/mathgl-2.1.2/work/mathgl-2.1.2_build/udav && /usr/bin/cmake -E cmake_link_script CMakeFiles/udav.dir/link.txt --verbose=1
/usr/bin/x86_64-pc-linux-gnu-g++   -O2 -march=corei7-avx -pipe    -Wl,-O1 -Wl,--as-needed CMakeFiles/udav.dir/anim_dlg.cpp.o CMakeFiles/udav.dir/find_dlg.cpp.o CMakeFiles/udav.dir/mem_pnl.cpp.o CMakeFiles/udav.dir/prop_dlg.cpp.o CMakeFiles/udav.dir/textedit.cpp.o CMakeFiles/udav.dir/args_dlg.cpp.o CMakeFiles/udav.dir/help_pnl.cpp.o CMakeFiles/udav.dir/newcmd_dlg.cpp.o CMakeFiles/udav.dir/text_pnl.cpp.o CMakeFiles/udav.dir/calc_dlg.cpp.o CMakeFiles/udav.dir/hint_dlg.cpp.o CMakeFiles/udav.dir/open_dlg.cpp.o CMakeFiles/udav.dir/qmglsyntax.cpp.o CMakeFiles/udav.dir/udav_wnd.cpp.o CMakeFiles/udav.dir/dat_pnl.cpp.o CMakeFiles/udav.dir/info_dlg.cpp.o CMakeFiles/udav.dir/opt_dlg.cpp.o CMakeFiles/udav.dir/setup_dlg.cpp.o CMakeFiles/udav.dir/files_dlg.cpp.o CMakeFiles/udav.dir/plot_pnl.cpp.o CMakeFiles/udav.dir/style_dlg.cpp.o CMakeFiles/udav.dir/data_dlg.cpp.o CMakeFiles/udav.dir/tree_pnl.cpp.o CMakeFiles/udav.dir/moc_anim_dlg.cxx.o CMakeFiles/udav.dir/moc_files_dlg.cxx.o CMakeFiles/udav.dir/moc_info_dlg.cxx.o CMakeFiles/udav.dir/moc_opt_dlg.cxx.o CMakeFiles/udav.dir/moc_qmglsyntax.cxx.o CMakeFiles/udav.dir/moc_text_pnl.cxx.o CMakeFiles/udav.dir/moc_args_dlg.cxx.o CMakeFiles/udav.dir/moc_find_dlg.cxx.o CMakeFiles/udav.dir/moc_mem_pnl.cxx.o CMakeFiles/udav.dir/moc_plot_pnl.cxx.o CMakeFiles/udav.dir/moc_setup_dlg.cxx.o CMakeFiles/udav.dir/moc_udav_wnd.cxx.o CMakeFiles/udav.dir/moc_calc_dlg.cxx.o CMakeFiles/udav.dir/moc_help_pnl.cxx.o CMakeFiles/udav.dir/moc_newcmd_dlg.cxx.o CMakeFiles/udav.dir/moc_prop_dlg.cxx.o CMakeFiles/udav.dir/moc_style_dlg.cxx.o CMakeFiles/udav.dir/moc_dat_pnl.cxx.o CMakeFiles/udav.dir/moc_open_dlg.cxx.o CMakeFiles/udav.dir/moc_textedit.cxx.o CMakeFiles/udav.dir/moc_hint_dlg.cxx.o CMakeFiles/udav.dir/moc_data_dlg.cxx.o CMakeFiles/udav.dir/qrc_udav.cxx.o  -o udav -rdynamic ../widgets/libmgl-qt.so.7.0.0 /usr/lib64/qt4/libQtGui.so /usr/lib64/qt4/libQtCore.so ../src/libmgl.so.7.0.0 -lhpdf -ljpeg -lgif -lGLU -lGL -lSM -lICE -lX11 -lXext -lpng -lz -lm -Wl,-rpath,/var/tmp/portage/sci-libs/mathgl-2.1.2/work/mathgl-2.1.2_build/widgets:/usr/lib64/qt4:/var/tmp/portage/sci-libs/mathgl-2.1.2/work/mathgl-2.1.2_build/src: 
make[2]: Leaving directory `/var/tmp/portage/sci-libs/mathgl-2.1.2/work/mathgl-2.1.2_build'
/usr/bin/cmake -E cmake_progress_report /var/tmp/portage/sci-libs/mathgl-2.1.2/work/mathgl-2.1.2_build/CMakeFiles  61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
[100%] Built target udav
make[1]: Leaving directory `/var/tmp/portage/sci-libs/mathgl-2.1.2/work/mathgl-2.1.2_build'
make: *** [all] Error 2
 [31;01m*[0m ERROR: sci-libs/mathgl-2.1.2 failed (compile phase):
 [31;01m*[0m   emake failed
 [31;01m*[0m 
 [31;01m*[0m If you need support, post the output of `emerge --info '=sci-libs/mathgl-2.1.2'`,
 [31;01m*[0m the complete build log and the output of `emerge -pqv '=sci-libs/mathgl-2.1.2'`.
 [31;01m*[0m The complete build log is located at '/var/tmp/portage/sci-libs/mathgl-2.1.2/temp/build.log'.
 [31;01m*[0m The ebuild environment file is located at '/var/tmp/portage/sci-libs/mathgl-2.1.2/temp/environment'.
 [31;01m*[0m Working directory: '/var/tmp/portage/sci-libs/mathgl-2.1.2/work/mathgl-2.1.2_build'
 [31;01m*[0m S: '/var/tmp/portage/sci-libs/mathgl-2.1.2/work/mathgl-2.1.2'
Comment 1 Anton Kochkov 2013-05-11 11:51:40 UTC
Created attachment 347980 [details]
emerge --info output
Comment 2 Juergen Rose 2013-06-17 18:15:17 UTC
Same here.
Comment 3 Daniel Savard 2013-10-15 13:40:38 UTC
Same thing here. It seems something is missing to define the include path where the arrayobject.h file can be found. The problem lies with the ebuild script which is missing at least one step in configure. I don't know exactly how to fix this, however here are my findings.

If you do:

cd /usr/portage/sci-libs/mathgl/
ebuild mathgl-2.1.2.ebuild configure

these steps will complete without a glitch. However, the next step:

ebuild mathgl-2.1.2.ebuild compile

will fail with the reported error in this bug report. If you do the following instead:

cd /usr/portage/sci-libs/mathgl/
ebuild mathgl-2.1.2.ebuild configure
cd /var/tmp/portage/sci-libs/mathgl-2.1.2/work/mathgl-2.1.2
cmake .
make

it will succeed. However, the install path will be set to /usr/local instead of the appropriate location in the temporary filetree.

I hope this can help to resolve this issue. Seems pretty clear something is wrong with the ebuild script which is a copy from the previous version of mathgl.
Comment 4 Daniel Savard 2013-10-15 14:06:41 UTC
Okay,

I found a fix in the ebuild file. After reading the configure section I see there is a fix done for numpy after running the cmake, here is the original code snippet from the mathgl-2.1.2.ebuild file:

src_configure() {
    local mycmakeargs=(
        -DHDF4_INCLUDE_DIR="${EPREFIX}/usr/include"
        $(cmake-utils_use doc enable-doc)
        $(cmake-utils_use fltk enable-fltk)
        $(cmake-utils_use gif enable-gif)
        $(cmake-utils_use glut enable-glut)
        $(cmake-utils_use gsl enable-gsl)
        $(cmake-utils_use hdf enable-hdf4)
        $(cmake-utils_use hdf5 enable-hdf5_18)
        $(cmake-utils_use jpeg enable-jpeg)
        $(cmake-utils_use mpi enable-mpi)
        $(cmake-utils_use octave enable-octave)
        $(cmake-utils_use opengl enable-opengl)
        $(cmake-utils_use pdf enable-pdf)
        $(cmake-utils_use png enable-png)
        $(cmake-utils_use qt4 enable-qt)
        $(cmake-utils_use threads enable-pthread)
        $(cmake-utils_use python enable-python)
        $(cmake-utils_use wxwidgets enable-wx)
        $(cmake-utils_use zlib enable-zlib)
    )
    cmake-utils_src_configure
    # to whoever cares: TODO: do for multiple python ABI
    if use python; then
        sed -i \
            -e "s:--prefix=\(.*\) :--prefix=\$ENV{DESTDIR}\1 :" \
            "${CMAKE_BUILD_DIR}"/lang/cmake_install.cmake || die
        # fix location of numpy
        use python && append-cppflags \
            -I$(echo "import numpy; print(numpy.get_include())" | "$(PYTHON)" - 2>/dev/null)
    fi

}

I simply added the following line at the bottom of the section before the closing braces:

cmake-utils_src_configure

In order to rerun the cmake after the modification for numpy has been done and it fixed the problem. I was then able to run the compile, install and merge phases.
Comment 5 Justin Lecher (RETIRED) gentoo-dev 2013-10-15 15:00:42 UTC
+*mathgl-2.1.3 (15 Oct 2013)
+
+  15 Oct 2013; Justin Lecher <jlec@gentoo.org> mathgl-2.1.2.ebuild,
+  +mathgl-2.1.3.ebuild, metadata.xml:
+  Version BUmp; Bump to python r1 eclasses; fix numpy header path issues,
+  #469420
+