* bug#67416: Error when installing package, CMAKE_Fortran_COMPILER could be found
@ 2023-11-23 16:21 Pierre Clouzet
2023-11-24 16:53 ` Tobias Geerinckx-Rice
0 siblings, 1 reply; 5+ messages in thread
From: Pierre Clouzet @ 2023-11-23 16:21 UTC (permalink / raw)
To: 67416
[-- Attachment #1: Type: text/plain, Size: 4061 bytes --]
Hello,
I'm trying to install a package with the command:
guix package --install-from-file=gmsh-try.scm
the gmsh-try.csm looks like this:
(use-modules (guix packages)
(guix download)
(guix licenses)
(guix build-system cmake))
(package
(name "mygmsh")
(version "3.0.6")
(source (origin
(method url-fetch)
(uri (string-append "https://gmsh.info/src/gmsh-3.0.6-source.tgz"))
(sha256
(base32
"0ywqhr0zmdhn8dvi6l8z1vkfycyv67fdrz6b95mb39np832bq04p"))))
(build-system cmake-build-system)
(arguments
`(#:configure-flags '("-DENABLE_BUILD_LIB=1"
"-DCMAKE_INSTALL_PREFIX=/opt/nextsim_gnu/gmsh-3.0.6"
"-DENABLE_MMG3D=FALSE")))
(synopsis "3D finite element grid generator")
(description "Gmsh is a 3D finite element grid generator with a built-in
CAD engine and post-processor. Its design goal is to provide a fast, light
and user-friendly meshing tool with parametric input and advanced
visualization capabilities. Gmsh is built around four modules: geometry,
mesh, solver and post-processing. The specification of any input to these
modules is done either interactively using the graphical user interface or in
ASCII text files using Gmsh's own scripting language.")
(home-page "http://gmsh.info//")
(license gpl2+))
When at some point, cmake tests things, this is what I get:
-- The CXX compiler identification is GNU 11.3.0
-- The C compiler identification is GNU 11.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /gnu/store/5lqhcv91ijy82p92ac6g5xw48l0lwwz4-gcc-11.3.0/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /gnu/store/5lqhcv91ijy82p92ac6g5xw48l0lwwz4-gcc-11.3.0/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of void*
-- Check size of void* - done
-- Found 64Bit
-- Performing Test STDCXX11
-- Performing Test STDCXX11 - Success
-- Found C++11
-- The Fortran compiler identification is unknown
CMake Error at CMakeLists.txt:421 (enable_language):
No CMAKE_Fortran_COMPILER could be found.
Tell CMake where to find the compiler by setting either the environment
variable "FC" or the CMake cache entry CMAKE_Fortran_COMPILER to the full
path to the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "/tmp/guix-build-mygmsh-3.0.6.drv-0/build/CMakeFiles/CMakeOutput.log".
See also "/tmp/guix-build-mygmsh-3.0.6.drv-0/build/CMakeFiles/CMakeError.log".
error: in phase 'configure': uncaught exception:
%exception #<&invoke-error program: "cmake" arguments: ("../gmsh-3.0.6-source" "-DCMAKE_BUILD_TYPE=RelWithDebInfo" "-DCMAKE_INSTALL_PREFIX=/gnu/store/kvx8rfsa457xz9723zsyk8x41zscs63l-mygmsh-3.0.6" "-DCMAKE_INSTALL_LIBDIR=lib" "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE" "-DCMAKE_INSTALL_RPATH=/gnu/store/kvx8rfsa457xz9723zsyk8x41zscs63l-mygmsh-3.0.6/lib" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DENABLE_BUILD_LIB=1" "-DCMAKE_INSTALL_PREFIX=/opt/nextsim_gnu/gmsh-3.0.6" "-DENABLE_MMG3D=FALSE") exit-status: 1 term-signal: #f stop-signal: #f>
phase `configure' failed after 0.8 seconds
command "cmake" "../gmsh-3.0.6-source" "-DCMAKE_BUILD_TYPE=RelWithDebInfo" "-DCMAKE_INSTALL_PREFIX=/gnu/store/kvx8rfsa457xz9723zsyk8x41zscs63l-mygmsh-3.0.6" "-DCMAKE_INSTALL_LIBDIR=lib" "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE" "-DCMAKE_INSTALL_RPATH=/gnu/store/kvx8rfsa457xz9723zsyk8x41zscs63l-mygmsh-3.0.6/lib" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DENABLE_BUILD_LIB=1" "-DCMAKE_INSTALL_PREFIX=/opt/nextsim_gnu/gmsh-3.0.6" "-DENABLE_MMG3D=FALSE" failed with status 1
It looks like cmake cant find fortran compiler. I'm very new to guix universe so I may have missed a step.
Thanks in advance,
Pierre
[-- Attachment #2: Type: text/html, Size: 5798 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Error when installing package, CMAKE_Fortran_COMPILER could be found
2023-11-23 16:21 bug#67416: Error when installing package, CMAKE_Fortran_COMPILER could be found Pierre Clouzet
@ 2023-11-24 16:53 ` Tobias Geerinckx-Rice
2023-11-28 15:42 ` Simon Tournier
0 siblings, 1 reply; 5+ 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] 5+ messages in thread
* Re: Error when installing package, CMAKE_Fortran_COMPILER could be found
2023-11-24 16:53 ` Tobias Geerinckx-Rice
@ 2023-11-28 15:42 ` Simon Tournier
2023-11-30 9:44 ` Pierre Clouzet
0 siblings, 1 reply; 5+ 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] 5+ 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; 5+ 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] 5+ 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; 5+ 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] 5+ messages in thread
end of thread, other threads:[~2024-01-12 12:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-23 16:21 bug#67416: Error when installing package, CMAKE_Fortran_COMPILER could be found Pierre Clouzet
2023-11-24 16:53 ` Tobias Geerinckx-Rice
2023-11-28 15:42 ` Simon Tournier
2023-11-30 9:44 ` Pierre Clouzet
2024-01-11 16:50 ` Simon Tournier
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.