unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Error when installing package, CMAKE_Fortran_COMPILER could be found
       [not found] <441964777.14793216.1700756479745.JavaMail.zimbra@inria.fr>
@ 2023-11-24 16:53 ` Tobias Geerinckx-Rice
  2023-11-28 15:42   ` Simon Tournier
  0 siblings, 1 reply; 4+ messages in thread
From: Tobias Geerinckx-Rice @ 2023-11-24 16:53 UTC (permalink / raw)
  To: Pierre Clouzet, help-guix; +Cc: control

close 67416
thanks

(The above is for the Debbugs control bot.  The bug-guix@ address is for reporting shortcomings in Guix.  For general support, please use help-guix@.  I've moved this discussion there.)

Hi Pierre,

It appears that you haven't given the package a FORTRAN compiler to find.  Try

  (native-inputs (list gfortran))

to add one to the build environment.  Do not waste time 'guix install'ing anything, this will have 0 effect.

If the build system still won't find gfortran, try

  (arguments
    `(
      ...
      #:phases
      (modify-phases %standard-phases
        (add-before 'configure 'find-gfortran
          (lambda _
            (setenv "FC" (which "gfortran"))))))

or so.  Untested example, assuming the compiler binary is also named 'gfortran'.

Kind regards,

T G-R

Sent on the go.  Excuse or enjoy my brevity.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Error when installing package, CMAKE_Fortran_COMPILER could be found
  2023-11-24 16:53 ` Error when installing package, CMAKE_Fortran_COMPILER could be found Tobias Geerinckx-Rice
@ 2023-11-28 15:42   ` Simon Tournier
  2023-11-30  9:44     ` Pierre Clouzet
  0 siblings, 1 reply; 4+ messages in thread
From: Simon Tournier @ 2023-11-28 15:42 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice, Pierre Clouzet, help-guix

Hi Pierre,

On Fri, 24 Nov 2023 at 16:53, Tobias Geerinckx-Rice <me@tobias.gr> wrote:

> It appears that you haven't given the package a FORTRAN compiler to find.  Try
>
>   (native-inputs (list gfortran))

In addition to Tobias’s words, the recipe will fail at the tests:

--8<---------------cut here---------------start------------->8---
The following tests FAILED:
	  1 - ../gmsh-3.0.6-source/demos/post_processing/lowmem-anim.geo (Failed)
	  4 - ../gmsh-3.0.6-source/demos/simple_geo/antenna.geo (Timeout)
	  8 - ../gmsh-3.0.6-source/demos/simple_geo/filter.geo (Failed)
	  9 - ../gmsh-3.0.6-source/demos/simple_geo/hex.geo (Failed)
	 11 - ../gmsh-3.0.6-source/demos/simple_geo/indheat.geo (Failed)
	 12 - ../gmsh-3.0.6-source/demos/simple_geo/machine.geo (Timeout)
	 13 - ../gmsh-3.0.6-source/demos/simple_geo/piece-extr-rec.geo (Failed)
	 14 - ../gmsh-3.0.6-source/demos/simple_geo/piece-extr.geo (Failed)
	 16 - ../gmsh-3.0.6-source/demos/simple_geo/pripyrtet.geo (Failed)
	 18 - ../gmsh-3.0.6-source/demos/simple_geo/sphere.geo (Failed)
	 29 - ../gmsh-3.0.6-source/tutorial/t13.geo (SEGFAULT)
	 32 - ../gmsh-3.0.6-source/tutorial/t16.geo (Failed)
	 33 - ../gmsh-3.0.6-source/tutorial/t17.geo (Failed)
	 35 - ../gmsh-3.0.6-source/tutorial/t3.geo (Failed)
--8<---------------cut here---------------end--------------->8---

Well, IIRC, gmsh has some dependencies, depending on the default options
selected at configure time.  For instance, see the current Gmsh from the
module (gnu packages maths), e.g., guix edit gmsh or [1] lists all the
dependencies:

    (propagated-inputs
     (list fltk
           gfortran
           glu
           gmp
           hdf5
           lapack
           libx11
           libxext
           mesa
           metis
           opencascade-occt))
    (inputs
     (list fontconfig
           libxft
           python))

Moreover, I am not sure for this flag you set in your recipe:

                         "-DCMAKE_INSTALL_PREFIX=/opt/nextsim_gnu/gmsh-3.0.6"

Hope that helps.

Cheers,
simon


1: https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/maths.scm#n3233


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Error when installing package, CMAKE_Fortran_COMPILER could be found
  2023-11-28 15:42   ` Simon Tournier
@ 2023-11-30  9:44     ` Pierre Clouzet
  2024-01-11 16:50       ` Simon Tournier
  0 siblings, 1 reply; 4+ messages in thread
From: Pierre Clouzet @ 2023-11-30  9:44 UTC (permalink / raw)
  To: Simon Tournier; +Cc: Tobias Geerinckx-Rice, help-guix

[-- Attachment #1: Type: text/plain, Size: 3085 bytes --]

Hi Simon, 
Thanks for your reply! I managed to make it work finally. I'm working with an old code that need this specific version of the package.

Also, this code does not use configure/make/make install of cmake/make/make install way of installing.
Instead I need to run a script exporting variables with a . ./script.sh command
I was wondering if you could give me a hint about how to say in a manifest how to run such script (if possible).
You can find such script attached.

Thanks, 
Pierre
----- Mail original -----
> De: "Simon Tournier" <zimon.toutoune@gmail.com>
> À: "Tobias Geerinckx-Rice" <me@tobias.gr>, "Pierre Clouzet" <pierre.clouzet@inria.fr>, help-guix@gnu.org
> Envoyé: Mardi 28 Novembre 2023 16:42:46
> Objet: Re: Error when installing package, CMAKE_Fortran_COMPILER could be found

> Hi Pierre,
> 
> On Fri, 24 Nov 2023 at 16:53, Tobias Geerinckx-Rice <me@tobias.gr> wrote:
> 
>> It appears that you haven't given the package a FORTRAN compiler to find.  Try
>>
>>   (native-inputs (list gfortran))
> 
> In addition to Tobias’s words, the recipe will fail at the tests:
> 
> --8<---------------cut here---------------start------------->8---
> The following tests FAILED:
>	  1 - ../gmsh-3.0.6-source/demos/post_processing/lowmem-anim.geo (Failed)
>	  4 - ../gmsh-3.0.6-source/demos/simple_geo/antenna.geo (Timeout)
>	  8 - ../gmsh-3.0.6-source/demos/simple_geo/filter.geo (Failed)
>	  9 - ../gmsh-3.0.6-source/demos/simple_geo/hex.geo (Failed)
>	 11 - ../gmsh-3.0.6-source/demos/simple_geo/indheat.geo (Failed)
>	 12 - ../gmsh-3.0.6-source/demos/simple_geo/machine.geo (Timeout)
>	 13 - ../gmsh-3.0.6-source/demos/simple_geo/piece-extr-rec.geo (Failed)
>	 14 - ../gmsh-3.0.6-source/demos/simple_geo/piece-extr.geo (Failed)
>	 16 - ../gmsh-3.0.6-source/demos/simple_geo/pripyrtet.geo (Failed)
>	 18 - ../gmsh-3.0.6-source/demos/simple_geo/sphere.geo (Failed)
>	 29 - ../gmsh-3.0.6-source/tutorial/t13.geo (SEGFAULT)
>	 32 - ../gmsh-3.0.6-source/tutorial/t16.geo (Failed)
>	 33 - ../gmsh-3.0.6-source/tutorial/t17.geo (Failed)
>	 35 - ../gmsh-3.0.6-source/tutorial/t3.geo (Failed)
> --8<---------------cut here---------------end--------------->8---
> 
> Well, IIRC, gmsh has some dependencies, depending on the default options
> selected at configure time.  For instance, see the current Gmsh from the
> module (gnu packages maths), e.g., guix edit gmsh or [1] lists all the
> dependencies:
> 
>    (propagated-inputs
>     (list fltk
>           gfortran
>           glu
>           gmp
>           hdf5
>           lapack
>           libx11
>           libxext
>           mesa
>           metis
>           opencascade-occt))
>    (inputs
>     (list fontconfig
>           libxft
>           python))
> 
> Moreover, I am not sure for this flag you set in your recipe:
> 
>                         "-DCMAKE_INSTALL_PREFIX=/opt/nextsim_gnu/gmsh-3.0.6"
> 
> Hope that helps.
> 
> Cheers,
> simon
> 
> 
> 1: https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/maths.scm#n3233

[-- Attachment #2: set_env_linux.sh --]
[-- Type: application/x-shellscript, Size: 3133 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Error when installing package, CMAKE_Fortran_COMPILER could be found
  2023-11-30  9:44     ` Pierre Clouzet
@ 2024-01-11 16:50       ` Simon Tournier
  0 siblings, 0 replies; 4+ messages in thread
From: Simon Tournier @ 2024-01-11 16:50 UTC (permalink / raw)
  To: Pierre Clouzet; +Cc: Tobias Geerinckx-Rice, help-guix

Hi Pierre,

Sorry for the late reply.

On Thu, 30 Nov 2023 at 10:44, Pierre Clouzet <pierre.clouzet@inria.fr> wrote:

> Also, this code does not use configure/make/make install of cmake/make/make install way of installing.
> Instead I need to run a script exporting variables with a . ./script.sh command
> I was wondering if you could give me a hint about how to say in a manifest how to run such script (if possible).
> You can find such script attached.

If you have not found a way in the mean time, I do not have an answer
because I am a bit confused by your question. :-)

Do you mean run the script with some manifest.scm file as with “guix
shell -m manifest.scm” or do you mean include such script with the Guix
recipe of your package variant?

If I understand correctly, you are trying to package nextsim that needs
one specific version of Gmsh, right?

The script set_env_linux.sh reads,

--8<---------------cut here---------------start------------->8---
# 1. Before compiling, install:
# - necdf, necdfcxx, boost, openmpi, gcc11:
# sudo apt install libnetcdf-c++4 libnetcdf-dev libblas-dev liblapack-dev libboost-dev \
#	libboost-chrono-dev \ libboost-date-time-dev \ libboost-filesystem-dev \
#	libboost-iostreams-dev \ libboost-log-dev \ libboost-locale-dev \
#	libboost-math-dev \ libboost-mpi-dev \ libboost-program-options-dev \
#	libboost-regex-dev \ libboost-serialization-dev \ libboost-system-dev \ libboost-timer-dev
# - also go to dependencies/gmsh-3.0.6-source
# and run the install_gmsh_for_nextsim.sh WITHOUT changing the CMAKE_PREFIX_INSTALL variable.
# 2. Compiling:
# -check that paths listed below, fit your configuration.
# - run this script to set the environement: ". ./set_env_linux.sh" (NOT ./set_env_linux.sh)
# - run make -j${nproc}
--8<---------------cut here---------------end--------------->8---

and it is not clear:

 1. if you want or not keep the dependencies from APT or replace them by
    the ones from Guix?
 2. if you want to only build Gmsh with Guix and all the rest not?
 3. how you would like to build nextsim?

What would make sense to me would to build all using Guix; it would
mean:

 a) package the patched version of Gmsh (somehow replace
    install_gmsh_for_nextsim.sh)
 b) tweak set_env_linux.sh for making it Guix-friendly (substitute the
    various hard coded PATH by Guix ones, etc.)
 c) replace the ’build’ phase of cmake build-system by calling this
    modified script by step b.

Well, maybe I misread the question. :-)

Cheers,
simon


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-01-12 12:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <441964777.14793216.1700756479745.JavaMail.zimbra@inria.fr>
2023-11-24 16:53 ` Error when installing package, CMAKE_Fortran_COMPILER could be found Tobias Geerinckx-Rice
2023-11-28 15:42   ` Simon Tournier
2023-11-30  9:44     ` Pierre Clouzet
2024-01-11 16:50       ` Simon Tournier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).