all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Problem with uilding a package for intel onepi fortran compiler.
@ 2022-04-13  6:38 Céline Acary-Robert
  2022-04-14  4:06 ` Thiago Jung Bauermann
  2022-09-02 16:46 ` zimoun
  0 siblings, 2 replies; 5+ messages in thread
From: Céline Acary-Robert @ 2022-04-13  6:38 UTC (permalink / raw)
  To: Help-Guix

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

Hello, 
We are trying to build a package for intel onepi fortran compiler. The sources are installed through a script "install" (/bin/sh) which calls a binary bootstrapper which allows to download the files and install them 
Fisrt, launching the script as a standard user is OK. 

Writing a scm file, we can run the install script but when calling the boostrapper binary ends with the following error message "no such file or directory". 
Adding a phase to chmod this binary is OK, so the file is in the supposed directory. We have tried to export HOME and USER environement variables but without any effect. 
Has anyone encountered this kind of error ? 

I join the package 

Thank you very much in advance for any help ... 
Best regards 
Céline 

----------------------------------------------------------------------------------------- 
guix build -f oneapi.scm returns 


phase `set-paths' succeeded after 1.3 seconds 
starting phase `install-locale' 
using 'en_US.utf8' locale for category "LC_ALL" 
phase `install-locale' succeeded after 0.0 seconds 
starting phase `unpack' 
phase `unpack' succeeded after 0.9 seconds 
starting phase `bootstrap' 
no 'configure.ac' or anything like that, doing nothing 
phase `bootstrap' succeeded after 0.0 seconds 
starting phase `patch-usr-bin-file' 
phase `patch-usr-bin-file' succeeded after 0.0 seconds 
starting phase `patch-source-shebangs' 
patch-shebang: ./l_fortran-compiler_p_2022.0.1.70_offline.sh: changing `/bin/sh' to `/gnu/store/d99ykvj3axzzidygsmdmzxah4lvxd6hw-bash-5.1.8/bin/sh' 
phase `patch-source-shebangs' succeeded after 5.2 seconds 
starting phase `patch-generated-file-shebangs' 
phase `patch-generated-file-shebangs' succeeded after 0.0 seconds 
starting phase `extract-package' 
Extracted to /tmp/guix-build-intel_oneapi-2022.0.1.70.drv-0/l_fortran-compiler_p_2022.0.1.70_offline 
phase `extract-package' succeeded after 6.3 seconds 
starting phase `patch-more-shebangs' 
phase `patch-more-shebangs' succeeded after 0.0 seconds 
starting phase `install' 
./install.sh: line 34: /tmp/guix-build-intel_oneapi-2022.0.1.70.drv-0/l_fortran-compiler_p_2022.0.1.70_offline/bootstrapper: No such file or directory 
error: in phase 'install': uncaught exception: 
%exception #<&invoke-error program: "sh" arguments: ("./install.sh" "--silent" "--eula accept") exit-status: 127 term-signal: #f stop-signal: #f> 
phase `install' failed after 0.0 seconds 
command "sh" "./install.sh" "--silent" "--eula accept" failed with status 127 

-- 
Céline Acary-Robert 
LJK[Scalde/AirSea]/GRICAD/MaiMoSiNE 
04 57 42 17 89 

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: oneapi.scm --]
[-- Type: text/x-scheme; name=oneapi.scm, Size: 3170 bytes --]

(use-modules
   ((guix licenses) #:prefix license:)
   (gnu packages)
   (guix packages)
   (guix utils)
   (guix download)
   (guix build-system gnu)
   (gnu packages maths)
   (gnu packages gcc)
   (gnu packages cmake)
   (gnu packages base)
   (gnu packages bash)
   (gnu packages ssh)
   (gnu packages gtk)
   (gnu packages freedesktop)
   (gnu packages ncurses)
   (gnu packages nss)
   (gnu packages xorg)
   (gnu packages xdisorg)
   (gnu packages gl)
   (gnu packages pkg-config)
   (gnu packages compression)
   (gnu packages lxqt)
   (gnu packages gnome))


(define-public oneapi
  (package
    (name "intel_oneapi")
    (version "2022.0.1.70")
    (source
      (origin
        (method url-fetch)
        (uri (string-append "https://registrationcenter-download.intel.com/akdlm/irc_nas/18436/l_fortran-comp$
        (sha256
          (base32
            "1lah7y9zhvd8vrahchvk7prka9q8wz88pbbczppvym1mz428mcic"))))
    (build-system gnu-build-system)
    (arguments
      '(#:tests? #f
        #:phases
          (modify-phases %standard-phases
         (delete 'configure)
         (delete 'check)
         (delete 'build)
         (add-before 'install 'extract-package
           (lambda _
             ;; simply extract the package  into the build directory
             (chmod "l_fortran-compiler_p_2022.0.1.70_offline.sh" #o755)
             (invoke "./l_fortran-compiler_p_2022.0.1.70_offline.sh"
                       "--extract-only" "--silent"
                      ;;"--extract-folder opt/intel/" "-a" "--install-dir opt/intel" "--download-cache opt/in$
                      ;;"--download-dir opt/intel/tmp" "--log-dir opt/intel" "--silent" "--eula accept"
    )))
       (add-after 'extract-package 'patch-more-shebangs
           (lambda* (#:key inputs #:allow-other-keys)
             (let ((bash (assoc-ref inputs "bash")))
             (substitute* '("l_fortran-compiler_p_2022.0.1.70_offline/install.sh")
                   (("/bin/sh")
                    (string-append bash "/bin/sh"))))))
        (replace 'install
        (lambda _
             ;; install the package with the provided installer.
        (chmod "l_fortran-compiler_p_2022.0.1.70_offline/install.sh" #o777)
        (chmod "l_fortran-compiler_p_2022.0.1.70_offline/bootstrapper" #o777)
        (chdir "l_fortran-compiler_p_2022.0.1.70_offline")
        (find-files ".")
        (invoke "sh" "./install.sh"  "--silent" "--eula accept"
                     ;;"--install-dir ./opt/intel" "--download-cache ./opt/intel/tmp"
                     ;;"--download-dir ./opt/intel/tmp" "--log-dir ./opt/intel/logs" "--ignore-errors"
    )))
)))
(inputs
       (list bash gtk+ mesa lxqt zlib cmake gcc))
      (native-inputs
       (list pkg-config bash))
      (propagated-inputs
       ;; These two libraries are in 'Requires.private' in libgit2.pc.
       (list libnotify xdg-utils ncurses nss libxcb libdrm gtk+ mesa lxqt zlib))

    (home-page
      "https://www.intel.com/content/www/us/en/developer/tools/oneapi/overview.html")
    (synopsis
      "Intel OneAPI HPC tools")
    (description
      "C and fortran intel compilers, MPI suite etc ..  ")
    (license #f)))

oneapi

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

* Re: Problem with uilding a package for intel onepi fortran compiler.
  2022-04-13  6:38 Problem with uilding a package for intel onepi fortran compiler Céline Acary-Robert
@ 2022-04-14  4:06 ` Thiago Jung Bauermann
  2022-09-02 16:46 ` zimoun
  1 sibling, 0 replies; 5+ messages in thread
From: Thiago Jung Bauermann @ 2022-04-14  4:06 UTC (permalink / raw)
  To: Céline Acary-Robert; +Cc: help-guix


Hello Céline,

Céline Acary-Robert <celine.acary-robert@univ-grenoble-alpes.fr> writes:

> We are trying to build a package for intel onepi fortran compiler. The
> sources are installed through a script "install" (/bin/sh) which calls
> a binary bootstrapper which allows to download the files and install
> them

I don’t know about the “no such file or directory” error that you are
seeing, but I can tell that if  you’re able to fix it, then you’ll run
into the problem that the binary bootstrapper won’t be able to download
the files.

Guix’s build environment doesn’t allow access to the network. A
package needs to be able to be built with the declared inputs and
native-inputs and nothing more. This is required for security, integrity
and build reproducibility of the resulting package.

Is it possible to download the files in advance and provide them as
inputs to the package?

> starting phase `install' 
> ./install.sh: line 34:

What's in line 34 of install.sh?

> /tmp/guix-build-intel_oneapi-2022.0.1.70.drv-0/l_fortran-compiler_p_2022.0.1.70_offline/bootstrapper:
> No such file or directory

If you run guix build with the “--keep-failed” argument, do you see a
“bootstraper” file in the directory above? If so, and if it is an ELF
binary, does running ‘ldd’ on it show that it has all the libraries that
it needs?

-- 
Thanks
Thiago


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

* Re: Problem with uilding a package for intel onepi fortran compiler.
  2022-04-13  6:38 Problem with uilding a package for intel onepi fortran compiler Céline Acary-Robert
  2022-04-14  4:06 ` Thiago Jung Bauermann
@ 2022-09-02 16:46 ` zimoun
  2022-09-02 16:59   ` Céline Acary
  1 sibling, 1 reply; 5+ messages in thread
From: zimoun @ 2022-09-02 16:46 UTC (permalink / raw)
  To: Céline Acary-Robert, Help-Guix

Hi Cécile,

I am really late to the party.  Did you solve the issue in the meantime?

On Wed, 13 Apr 2022 at 08:38, Céline Acary-Robert <celine.acary-robert@univ-grenoble-alpes.fr> wrote:

> We are trying to build a package for intel onepi fortran compiler. The
> sources are installed through a script "install" (/bin/sh) which calls
> a binary bootstrapper which allows to download the files and install
> them

As Thiago noticed, the network is not available inside the build
environment.  So it would not be possible that the script would download
these files.

The workaround is to download them beforehand, if possible, and provide
them as inputs.  Hum, I do not find an example in the Guix source; maybe
I remember incorrectly.



> ./install.sh: line 34: /tmp/guix-build-intel_oneapi-2022.0.1.70.drv-0/l_fortran-compiler_p_2022.0.1.70_offline/bootstrapper: No such file or directory 
> error: in phase 'install': uncaught exception:

Are you sure that the file pointed by the script install.sh at the line
34 is provided by the source of the package.  You can examine the
post-mortem failure with:

    guix build -f oneapi.scm -K
    cd /tmp/guix-<blabla>/source

and inspect this line 34.


>         (uri (string-append "https://registrationcenter-download.intel.com/akdlm/irc_nas/18436/l_fortran-comp$

It is hard to test myself since the URL had been mangled.  Could you
provide where can I download the archive?  Well, if it is still an
issue. :-)


Cheers,
simon


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

* Re: Problem with uilding a package for intel onepi fortran compiler.
  2022-09-02 16:46 ` zimoun
@ 2022-09-02 16:59   ` Céline Acary
  2022-09-09 17:24     ` zimoun
  0 siblings, 1 reply; 5+ messages in thread
From: Céline Acary @ 2022-09-02 16:59 UTC (permalink / raw)
  To: zimoun; +Cc: Help-Guix

Hi Simon
Not really
Pierre Antoine là-dedans significative progress without reaching to suceed....
Cheers 

> Le 2 sept. 2022 à 18:46, zimoun <zimon.toutoune@gmail.com> a écrit :
> 
> Hi Cécile,
> 
> I am really late to the party.  Did you solve the issue in the meantime?
> 
>> On Wed, 13 Apr 2022 at 08:38, Céline Acary-Robert <celine.acary-robert@univ-grenoble-alpes.fr> wrote:
>> 
>> We are trying to build a package for intel onepi fortran compiler. The
>> sources are installed through a script "install" (/bin/sh) which calls
>> a binary bootstrapper which allows to download the files and install
>> them
> 
> As Thiago noticed, the network is not available inside the build
> environment.  So it would not be possible that the script would download
> these files.
> 
> The workaround is to download them beforehand, if possible, and provide
> them as inputs.  Hum, I do not find an example in the Guix source; maybe
> I remember incorrectly.
> 
> 
> 
>> ./install.sh: line 34: /tmp/guix-build-intel_oneapi-2022.0.1.70.drv-0/l_fortran-compiler_p_2022.0.1.70_offline/bootstrapper: No such file or directory 
>> error: in phase 'install': uncaught exception:
> 
> Are you sure that the file pointed by the script install.sh at the line
> 34 is provided by the source of the package.  You can examine the
> post-mortem failure with:
> 
>    guix build -f oneapi.scm -K
>    cd /tmp/guix-<blabla>/source
> 
> and inspect this line 34.
> 
> 
>>        (uri (string-append "https://registrationcenter-download.intel.com/akdlm/irc_nas/18436/l_fortran-comp$
> 
> It is hard to test myself since the URL had been mangled.  Could you
> provide where can I download the archive?  Well, if it is still an
> issue. :-)
> 
> 
> Cheers,
> simon


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

* Re: Problem with uilding a package for intel onepi fortran compiler.
  2022-09-02 16:59   ` Céline Acary
@ 2022-09-09 17:24     ` zimoun
  0 siblings, 0 replies; 5+ messages in thread
From: zimoun @ 2022-09-09 17:24 UTC (permalink / raw)
  To: Céline Acary; +Cc: Help-Guix

Hi Cécile,

On Fri, 02 Sep 2022 at 18:59, Céline Acary <celine.acary-robert@univ-grenoble-alpes.fr> wrote:

> Pierre Antoine là-dedans significative progress without reaching to suceed....

Let’s talk on all that in real life at Guix 10 years Days. :-)


Cheers,
simon


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

end of thread, other threads:[~2022-09-09 17:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-13  6:38 Problem with uilding a package for intel onepi fortran compiler Céline Acary-Robert
2022-04-14  4:06 ` Thiago Jung Bauermann
2022-09-02 16:46 ` zimoun
2022-09-02 16:59   ` Céline Acary
2022-09-09 17:24     ` zimoun

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.