<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>230837</bug_id>
          
          <creation_ts>2008-07-05 10:42 0000</creation_ts>
          <short_desc>sci-physics/camfr-20070717/ does not compile</short_desc>
          <delta_ts>2008-07-13 18:59:39 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Ebuilds</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>Peter.Bienstman@UGent.be</reporter>
          <assigned_to>sci-physics@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>Peter.Bienstman@UGent.be</who>
            <bug_when>2008-07-05 10:42:13 0000</bug_when>
            <thetext>* camfr-20070717.tgz RMD160 SHA1 SHA256 size ;-) ...                     [ ok ]
 * checking ebuild checksums ;-) ...                                      [ ok ]
 * checking auxfile checksums ;-) ...                                     [ ok ]
 * checking miscfile checksums ;-) ...                                    [ ok ]
 * checking camfr-20070717.tgz ;-) ...                                    [ ok ]
 * You need one of these Fortran Compilers: gfortran g77 ifc
 * Installed are:  gfortran
&gt;&gt;&gt; Unpacking source...
&gt;&gt;&gt; Unpacking camfr-20070717.tgz to /var/tmp/portage/sci-physics/camfr-20070717/work
 * Applying camfr-20070717-gcc43.patch ...                                [ ok ]
&gt;&gt;&gt; Source unpacked.
&gt;&gt;&gt; Compiling source in /var/tmp/portage/sci-physics/camfr-20070717/work/camfr_20070717 ...
Traceback (most recent call last):
  File &quot;setup.py&quot;, line 8, in ?
    from machine_cfg import *
  File &quot;/var/tmp/portage/sci-physics/camfr-20070717/work/camfr_20070717/machine_cfg.py&quot;, line 79
    library_dirs = [, &quot;/opt/intel/mkl/10.0.3.020/lib/32&quot;]
                    ^
SyntaxError: invalid syntax
 *
 * ERROR: sci-physics/camfr-20070717 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 3011:  Called distutils_src_compile
 *             environment, line  874:  Called die
 * The specific snippet of code:
 *       ${python} setup.py build &quot;$@&quot; || die &quot;compilation failed&quot;
 *  The die message:
 *   compilation failed
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at &apos;/var/tmp/portage/sci-physics/camfr-20070717/temp/build.log&apos;.
 * The ebuild environment file is located at &apos;/var/tmp/portage/sci-physics/camfr-20070717/temp/environment&apos;.
 *


Reproducible: Always</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>bicatali@gentoo.org</who>
            <bug_when>2008-07-06 10:25:47 0000</bug_when>
            <thetext>fixed again!</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>Peter.Bienstman@UGent.be</who>
            <bug_when>2008-07-06 15:55:31 0000</bug_when>
            <thetext>Thanks, we are getting there. But now I get:

python
Python 2.4.4 (#1, May 30 2008, 07:12:18)
[GCC 4.1.2 (Gentoo 4.1.2)] on linux2
Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.
&gt;&gt;&gt; from camfr import *
Traceback (most recent call last):
  File &quot;&lt;stdin&gt;&quot;, line 1, in ?
  File &quot;/usr/lib/python2.4/site-packages/PIL/__init__.py&quot;, line 8, in ?
    #
ImportError: /opt/intel/mkl/10.0.3.020/lib/32/libmkl_gnu_thread.so: undefined symbol: _gfortran_malloc
&gt;&gt;&gt;   </thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>bicatali@gentoo.org</who>
            <bug_when>2008-07-08 09:19:59 0000</bug_when>
            <thetext>Hi Peter,

I fixed a few errors in the mkl pkg-config files, and added the fortran lib to link in camfr.
I eselected mkl profiles for all, recompiled numpy, scipy and camfr, but I get the MKL_FATAL_ERROR in importing camfr.
mkl-10.0.2.108-r1 (which I fixed too) seems to behave a bit better.
I hope things work for you, I never use camfr!

NB: While looking at the camfr package sources, I noticed the machine_cfg.py.gentoo could really be more portable by using the toolchain environment variables instead of sourcing /etc/make.conf and forcing GNU compilers.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>Peter.Bienstman@UGent.be</who>
            <bug_when>2008-07-08 09:44:20 0000</bug_when>
            <thetext>Sorry to keep pestering you. I downgraded mkl. Compiling now works, as does importing, but running the test suite I get:

python camfr_test.py

CAMFR 20070717 - Copyright (C) 1998-2007 Peter Bienstman - Ghent University.


Running blazed grating...
MKL FATAL ERROR: /opt/intel/mkl/10.0.2.018/lib/em64t/libmkl_lapack.so: undefined symbol: __mkl_cfg_file_readed_extern
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>bicatali@gentoo.org</who>
            <bug_when>2008-07-09 15:58:50 0000</bug_when>
            <thetext>Hi, 

Could you try two more things:
* add -lmkl_lapack in the Libs part of the /opt/intel/mkl/1*/lib/*/lapack*pc, just after -lmkl_core, and re-install numpy, scipy and camfr
* if your are using gcc-4.1.2 and a threaded blas/lapack mkl gfortran profile, install and test with with gcc-4.2.4 or gcc-4.3.1.

Thanks,
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>Peter.Bienstman@UGent.be</who>
            <bug_when>2008-07-10 06:09:13 0000</bug_when>
            <thetext>Adding  -lmkl_lapack gives

python camfr_test.py

CAMFR 20070717 - Copyright (C) 1998-2007 Peter Bienstman - Ghent University.


Running blazed grating...
MKL FATAL ERROR: /opt/intel/mkl/10.0.3.020/lib/32/: cannot read file data: Is a directory

Does it still make sense to upgrade gcc? If so, with our without the mkl_lapack change?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>bicatali@gentoo.org</who>
            <bug_when>2008-07-10 09:23:53 0000</bug_when>
            <thetext>

&gt; MKL FATAL ERROR: /opt/intel/mkl/10.0.2.018/lib/em64t/libmkl_lapack.so:

&gt; MKL FATAL ERROR: /opt/intel/mkl/10.0.3.020/lib/32/: cannot read file data: Is 


Which version of mkl are you using? 10.0.2.018 should be more stable with respect to numpy/scipy. amd64 or x86?

&gt; Does it still make sense to upgrade gcc? If so, with our without the &gt;mkl_lapack change?

gcc upgrade probably makes sense if you use the mkl-gfortran-threads eselect profile. I think the mkl_gnu_thread library uses gfortran &gt; 4.2, but I&apos;m not sure about that. Also only libgfortran &gt;= 4.3 is really version independent. And test with the mkl_lapack change.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>Peter.Bienstman@UGent.be</who>
            <bug_when>2008-07-10 18:56:26 0000</bug_when>
            <thetext>Upgrading gcc to 4.3, using MKL 10.0.2.018, together with the mkl lapack change finally made things work, both on amd64 and x86.

(I did have to recompile blitz and upgrade boost to a ~arch version because of gcc 4.3 issues, though.) 

Thanks a lot for tracking this down!</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>bicatali@gentoo.org</who>
            <bug_when>2008-07-11 08:22:54 0000</bug_when>
            <thetext>(In reply to comment #8)
&gt; Upgrading gcc to 4.3, using MKL 10.0.2.018, together with the mkl lapack change
&gt; finally made things work, both on amd64 and x86.


If you still have the gcc-4.1.2 profile around, could you tell me if it works also for mkl gcc-4.1.2? I would need to update mkl deps.
Thanks</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>Peter.Bienstman@UGent.be</who>
            <bug_when>2008-07-11 10:42:34 0000</bug_when>
            <thetext>I couldn&apos;t get it to work with 4.1...</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>bicatali@gentoo.org</who>
            <bug_when>2008-07-13 18:59:39 0000</bug_when>
            <thetext>I added mkl_lapack in lapack mkl profiles and added a warning for gcc &lt;4.2 users using the gfortran-threads profile.
It should close this bug then.
Thanks.
</thetext>
          </long_desc>
      
    </bug>

</bugzilla>