astrojuanlu / fenics-recipes

This repository contains conda recipes for the FEniCS libraries
The Unlicense
13 stars 15 forks source link

No rule to make target `/usr/lib/gcc/x86_64-linux-gnu/4.8/libgfortran.so' #31

Closed sakhan007 closed 8 years ago

sakhan007 commented 9 years ago

I tried $ instant-clean but it did not solve this problem.

python poisson_convergence1.py 
Calling DOLFIN just-in-time (JIT) compiler, this may take some time.
In instant.recompile: The module did not compile with command 'make VERBOSE=1', see '/home/sohail/.instant/error/dolfin_compile_code_7c28a3053842033e63e724baf19e43119eaa0567/compile.log'
Traceback (most recent call last):
File "poisson_convergence1.py", line 16, in <module>
 f = Expression("5*pi*pi*sin(pi*x[0])*sin(2*pi*x[1])")
 File "/home/sohail/anaconda/envs/fenics27/lib/python2.7/site-packages/dolfin/functions/expression.py", line 602, in __new__
mpi_comm=mpi_comm)
File "/home/sohail/anaconda/envs/fenics27/lib/python2.7/site-packages/dolfin/compilemodules/expressions.py", line 217, in compile_expressions
mpi_comm=mpi_comm)
File "/home/sohail/anaconda/envs/fenics27/lib/python2.7/site-packages/dolfin/compilemodules/expressions.py", line 145, in compile_expression_code
mpi_comm=mpi_comm)
File "/home/sohail/anaconda/envs/fenics27/lib/python2.7/site-packages/dolfin/compilemodules/jit.py", line 64, in mpi_jit
return local_jit(*args, **kwargs)
File "/home/sohail/anaconda/envs/fenics27/lib/python2.7/site-packages/dolfin/compilemodules/compilemodule.py", line 458, in compile_extension_module
**instant_kwargs)
 File "/home/sohail/anaconda/envs/fenics27/lib/python2.7/site-packages/instant/build.py", line 563, in build_module
 recompile(modulename, module_path, new_compilation_checksum, build_system)
 File "/home/sohail/anaconda/envs/fenics27/lib/python2.7/site-packages/instant/build.py", line 165, in recompile
instant_error(msg % (cmd, compile_log_filename_dest))
File "/home/sohail/anaconda/envs/fenics27/lib/python2.7/site-packages/instant/output.py", line 85, in instant_error
raise RuntimeError(text)
RuntimeError: In instant.recompile: The module did not compile with command 'make VERBOSE=1', see '/home/sohail/.instant/error/dolfin_compile_code_7c28a3053842033e63e724baf19e43119eaa0567/compile.log'

The compile.log, mentioned in the above error log is: http://pastebin.com/U7fhfEiX

 $ conda info
 Current conda install:

         platform : linux-64
    conda version : 3.16.0
   conda-build version : 1.11.0
   python version : 2.7.10.final.0
   requests version : 2.7.0
   root environment : /home/sohail/anaconda  (writable)
   default environment : /home/sohail/anaconda/envs/fenics27
   envs directories : /home/sohail/anaconda/envs
    package cache : /home/sohail/anaconda/pkgs
    channel URLs : https://repo.continuum.io/pkgs/free/linux-64/
                    https://repo.continuum.io/pkgs/free/noarch/
                    https://repo.continuum.io/pkgs/pro/linux-64/
                    https://repo.continuum.io/pkgs/pro/noarch/
      config file : /home/sohail/.condarc
    is foreign system : False

The conda list: http://pastebin.com/43KDy6K3

astrojuanlu commented 9 years ago

I am unable to reproduce this. Could you please paste conda info -a so we can see the environment variables too? In the meanwhile, please do conda update --all in the environment.

sakhan007 commented 9 years ago

After doing conda update --all, the conda info -a returns: http://pastebin.com/Bj38KQEh

astrojuanlu commented 9 years ago

I don't think this will solve the issue, but just to check: would you try this?

$ bash
$ unset LD_LIBRARY_PATH
$ python poisson_convergence1.py

In the meanwhile, more questions:

If you don't have libgfortran, then you will need it. There might be a way to provide it in conda, but I would have to make sure first.

If you already have it, then I still won't know what's happening and I will request you to do the following:

$ instant-clean
$ echo 'from dolfin import *
> f = Expression("5*pi*pi*sin(pi*x[0])*sin(2*pi*x[1])")
' > test.py
$ python test.py

and upload to pastebin all the files that appear under ~/.instant/.

astrojuanlu commented 9 years ago

For the record: there's actually the option to install gfortran and libgfortran in conda: https://groups.google.com/a/continuum.io/d/msg/conda/HZlV2LXxWhs/UM_EgEeiYZIJ.

sakhan007 commented 9 years ago

Here is the answer to every question I was asked: http://pastebin.com/0h7kN2NP I don't think I need to install libgfortran, correct??? ~.instant/ contained too many files, so here is the archive: https://www.sendspace.com/file/31ecqv

astrojuanlu commented 9 years ago

Actually, as a last step, try to remove libgfortran from conda (conda remove libgfortran). If that doesn't work, I will have to inspect your files...

sakhan007 commented 9 years ago

conda remove libgfortran removed libgfortran as conda package.

astrojuanlu commented 9 years ago

Yes, I meant to try to rerun the script without the libgfortran conda package.

sakhan007 commented 9 years ago

https://www.sendspace.com/file/molvi8

sakhan007 commented 9 years ago

The above archive is when I run possion_convergence1.py and here is when I run test.py: https://www.sendspace.com/file/myowfl after instant-clean

astrojuanlu commented 9 years ago

The conflict with libgfortran dissapeared now, but apparently you mistyped the expression in the last case:

53: error: expected ‘)’ before ‘;’ token
       values[0] = 5*pi*pi*sin(pi*x[0])*sin(2*pi*x[1];
astrojuanlu commented 9 years ago

Holy sh*t, now I found what's happening. You have an older version of gfortran than me! The program is looking for 4.8 and you have 4.6 (https://github.com/Juanlu001/fenics-recipes/issues/31#issuecomment-138124574). Can you confirm again what is your Linux distro and version? Now everything makes sense, but I'll have to figure out how to fix it.

sakhan007 commented 9 years ago

Thanks for being so kind.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.5 LTS
Release:    12.04
Codename:   precise

Updated archive after correcting the mistyping in test.py: https://www.sendspace.com/file/c9pp7i

sakhan007 commented 9 years ago

Moreover my gcc version is 4.8.1 and gfortran is 4.6.4. I always thought that gfortran comes with gcc.

astrojuanlu commented 9 years ago

On 2015-09-07 01:16, sakhan007 wrote:

Moreover my gcc version is 4.8.1 and gfortran is 4.6.4. I always thought that gfortran comes with gcc.

Yeah, that looks like a strange mismatch for me too!

I assume that you cannot upgrade either gfortran or Ubuntu (FEniCS developers dropped Ubuntu 12.04 testing this year), so there are two options:

sakhan007 commented 9 years ago

I can upgrade gfortran and Ubuntu both as I have super user right. What do you suggest?

astrojuanlu commented 9 years ago

Sorry, I automatically assumed you were in a shared server or something!

Well, if you find a way to install gfortran 4.8 in your Ubuntu version that would be perfect. Obviously upgrading to a newer version of Ubuntu also would work but I understand that this can be a total mess.

Anyway, if you are not in a hurry and wait for the new package I would use your help to try if everything works :)

sakhan007 commented 9 years ago

Ok I will wait.

astrojuanlu commented 8 years ago

I'm getting some errors while trying to build instant with anaconda gcc and gfortran:

https://groups.google.com/a/continuum.io/d/msg/anaconda/lmJatGVqklU/QVIfYFkWCAAJ

astrojuanlu commented 8 years ago

There are some suggestions to improve portability here:

https://github.com/conda/conda-recipes/pull/279#issuecomment-98254389

I would need to see how to fit them into instant. I might need to submit an upstream patch, but definitely I will need to look at it with some care. @sakhan007 You should probably update gfortran because I will need some weeks to get this right.

sakhan007 commented 8 years ago

Does just updating gfortran would do the trick? or I have to build the whole fenics afterwards??

astrojuanlu commented 8 years ago

In principle updating gfortran should be enough. On Sep 14, 2015 10:16 AM, "sakhan007" notifications@github.com wrote:

Does just updating gfortran would do the trick? or I have to build the whole fenics afterwards??

— Reply to this email directly or view it on GitHub https://github.com/Juanlu001/fenics-recipes/issues/31#issuecomment-139993717 .

stuarteberg commented 8 years ago

Hey guys, I didn't read the above thread too closely, but I noticed you referenced conda/conda-recipes#279.

Just FYI, for best results, you should use the latest version of the gcc package, which is only available via the asmeurer channel: conda install -c asmeurer gcc=4.8.5. That version also includes some important fixes from conda/conda-recipes#401.

(BTW, the gcc package includes gfortran, and the libgcc package includes libgfortran.)

Theoretically, the conda guys will eventually push that gcc package over to the main anaconda channel. Until then, you'll need to specifically reference the asmeuer channel (or copy that package to your own channel, of course.) Just to repeat: Don't use the gcc 4.8.2 package that conda provides by default. It has portability problems.

astrojuanlu commented 8 years ago

Hi @stuarteberg, do you know if the Anaconda guys already pushed the latest fixes to the main channel? I'm waiting for that to fix my own packages. Thanks!

stuarteberg commented 8 years ago

do you know if the Anaconda guys already pushed the latest fixes to the main channel?

It looks like they finally did: https://anaconda.org/anaconda/gcc/files

$ conda search gcc
Fetching package metadata: ....
gcc                       .  4.8.2                         5  defaults        
                          .  4.8.5                         3  defaults        
libgcc                    .  4.8.4                         1  defaults        
                          .  4.8.5                         1  defaults
astrojuanlu commented 8 years ago

Thanks a lot for your answer, I will try to fix our issues now.

astrojuanlu commented 8 years ago

I pushed some changes that should fix these issues, but now I'm getting build errors related to PETSc. This is the neverending story :)

astrojuanlu commented 8 years ago

New packages uploaded. @e-aranda @sakhan007 Could you try updating DOLFIN to see if the errors are gone already? In principle the packages should be much more portable now.

e-aranda commented 8 years ago

Juan Luis,

thanks for your effort, but... I installed gcc-4.8 in my system and everything was fine. In order to try the new packages, I uninstalled gcc-4.8 and update dolfin from your channel. Then, running demo_poisson.py gives the following:

$ python demo_poisson.py 
Vendor:  Continuum Analytics, Inc. 
Package: mkl
Message: trial mode expires in 30 days
Calling DOLFIN just-in-time (JIT) compiler, this may take some time.
Calling DOLFIN just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Solving linear variational problem.
libGL error: unable to load driver: nouveau_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: nouveau
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  156 (GLX)
  Minor opcode of failed request:  3 (X_GLXCreateContext)
 Value in failed request:  0x0
 Serial number of failed request:  58
 Current serial number in output stream:  59
(fenics27)$

How can I undo the changes I made?

Ernesto

astrojuanlu commented 8 years ago

Hello @e-aranda, sorry for the inconvenience! Apparently I introduced some problem with the graphics which I have yet to understand. I will open a new issue, in the meanwhile you can manually install the previous build and run $ conda install /tmp/linux-64_dolfin-1.6.0-py27_2.tar.bz2.