Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cernlib: 2006 -> 2024.06.12.0 #336597

Merged
merged 1 commit into from
Sep 8, 2024
Merged

cernlib: 2006 -> 2024.06.12.0 #336597

merged 1 commit into from
Sep 8, 2024

Conversation

veprbl
Copy link
Member

@veprbl veprbl commented Aug 22, 2024

Description of changes

Update to a maintained version.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@veprbl
Copy link
Member Author

veprbl commented Aug 22, 2024

Result of nixpkgs-review pr 336597 run on x86_64-darwin 1

@veprbl
Copy link
Member Author

veprbl commented Aug 22, 2024

@GrahamcOfBorg build cernlib

@veprbl veprbl changed the title cern: 2006 -> 2024.06.12.0 cernlib: 2006 -> 2024.06.12.0 Aug 22, 2024
@smancill
Copy link
Contributor

smancill commented Sep 2, 2024

Result of nixpkgs-review pr 336597 run on x86_64-darwin 1

1 package failed to build:
  • cernlib
Errors:
cernlib> /tmp/nix-build-cernlib-2024.06.12.0.drv-0/cernlib-cernlib-2024.06.12.0-free/geant321/gkine/dummy.c:56:1: error: aliases are not supported on darwin
cernlib> WEAKDUMMY(User, UGINIT, uginit_, void);
cernlib> ^
cernlib> /tmp/nix-build-cernlib-2024.06.12.0.drv-0/cernlib-cernlib-2024.06.12.0-free/geant321/gkine/dummy.c:22:24: note: expanded from macro 'WEAKDUMMY'
cernlib>         __attribute__ ((weak, alias (stringify(underline(fortranname_))) ))
cernlib>                               ^
cernlib> /tmp/nix-build-cernlib-2024.06.12.0.drv-0/cernlib-cernlib-2024.06.12.0-free/geant321/gkine/dummy.c:57:1: error: aliases are not supported on darwin
cernlib> WEAKDUMMY(User, UGLAST, uglast_, void);
cernlib> ^
cernlib> /tmp/nix-build-cernlib-2024.06.12.0.drv-0/cernlib-cernlib-2024.06.12.0-free/geant321/gkine/dummy.c:22:24: note: expanded from macro 'WEAKDUMMY'
cernlib>         __attribute__ ((weak, alias (stringify(underline(fortranname_))) ))
cernlib>                               ^
cernlib> /tmp/nix-build-cernlib-2024.06.12.0.drv-0/cernlib-cernlib-2024.06.12.0-free/geant321/gkine/dummy.c:66:1: error: aliases are not supported on darwin
cernlib> WEAKDUMMY(Fluka, DOST,   dost_,   double);
cernlib> ^
cernlib> /tmp/nix-build-cernlib-2024.06.12.0.drv-0/cernlib-cernlib-2024.06.12.0-free/geant321/gkine/dummy.c:22:24: note: expanded from macro 'WEAKDUMMY'
cernlib>         __attribute__ ((weak, alias (stringify(underline(fortranname_))) ))
cernlib>                               ^
cernlib> /tmp/nix-build-cernlib-2024.06.12.0.drv-0/cernlib-cernlib-2024.06.12.0-free/geant321/gkine/dummy.c:67:1: error: aliases are not supported on darwin
cernlib> WEAKDUMMY(Fluka, EEXLVL, eexlvl_, void);
cernlib> ^
cernlib> /tmp/nix-build-cernlib-2024.06.12.0.drv-0/cernlib-cernlib-2024.06.12.0-free/geant321/gkine/dummy.c:22:24: note: expanded from macro 'WEAKDUMMY'
cernlib>         __attribute__ ((weak, alias (stringify(underline(fortranname_))) ))
cernlib>                               ^
cernlib> /tmp/nix-build-cernlib-2024.06.12.0.drv-0/cernlib-cernlib-2024.06.12.0-free/geant321/gkine/dummy.c:68:1: error: aliases are not supported on darwin
cernlib> WEAKDUMMY(Fluka, EVENTV, eventv_, void);
cernlib> ^
cernlib> /tmp/nix-build-cernlib-2024.06.12.0.drv-0/cernlib-cernlib-2024.06.12.0-free/geant321/gkine/dummy.c:22:24: note: expanded from macro 'WEAKDUMMY'
cernlib>         __attribute__ ((weak, alias (stringify(underline(fortranname_))) ))
cernlib>                               ^
cernlib> /tmp/nix-build-cernlib-2024.06.12.0.drv-0/cernlib-cernlib-2024.06.12.0-free/geant321/gkine/dummy.c:69:1: error: aliases are not supported on darwin
cernlib> WEAKDUMMY(Fluka, EVEVAP, evevap_, void);
cernlib> ^
cernlib> /tmp/nix-build-cernlib-2024.06.12.0.drv-0/cernlib-cernlib-2024.06.12.0-free/geant321/gkine/dummy.c:22:24: note: expanded from macro 'WEAKDUMMY'
cernlib>         __attribute__ ((weak, alias (stringify(underline(fortranname_))) ))
cernlib>                               ^
cernlib> /tmp/nix-build-cernlib-2024.06.12.0.drv-0/cernlib-cernlib-2024.06.12.0-free/geant321/gkine/dummy.c:70:1: error: aliases are not supported on darwin
cernlib> WEAKDUMMY(Fluka, EVVINI, evvini_, void);
cernlib> ^
cernlib> /tmp/nix-build-cernlib-2024.06.12.0.drv-0/cernlib-cernlib-2024.06.12.0-free/geant321/gkine/dummy.c:22:24: note: expanded from macro 'WEAKDUMMY'
cernlib>         __attribute__ ((weak, alias (stringify(underline(fortranname_))) ))
cernlib>                               ^
cernlib> /tmp/nix-build-cernlib-2024.06.12.0.drv-0/cernlib-cernlib-2024.06.12.0-free/geant321/gkine/dummy.c:71:1: error: aliases are not supported on darwin
cernlib> WEAKDUMMY(Fluka, FKENER, fkener_, double);
cernlib> ^
cernlib> /tmp/nix-build-cernlib-2024.06.12.0.drv-0/cernlib-cernlib-2024.06.12.0-free/geant321/gkine/dummy.c:22:24: note: expanded from macro 'WEAKDUMMY'
cernlib>         __attribute__ ((weak, alias (stringify(underline(fortranname_))) ))
cernlib>                               ^
cernlib> /tmp/nix-build-cernlib-2024.06.12.0.drv-0/cernlib-cernlib-2024.06.12.0-free/geant321/gkine/dummy.c:72:1: error: aliases are not supported on darwin
cernlib> WEAKDUMMY(Fluka, FKZERO, fkzero_, void);
cernlib> ^
cernlib> /tmp/nix-build-cernlib-2024.06.12.0.drv-0/cernlib-cernlib-2024.06.12.0-free/geant321/gkine/dummy.c:22:24: note: expanded from macro 'WEAKDUMMY'
cernlib>         __attribute__ ((weak, alias (stringify(underline(fortranname_))) ))
cernlib>                               ^
cernlib> /tmp/nix-build-cernlib-2024.06.12.0.drv-0/cernlib-cernlib-2024.06.12.0-free/geant321/gkine/dummy.c:73:1: error: aliases are not supported on darwin
cernlib> WEAKDUMMY(Fluka, NIZLNW, nizlnw_, void);
cernlib> ^
cernlib> /tmp/nix-build-cernlib-2024.06.12.0.drv-0/cernlib-cernlib-2024.06.12.0-free/geant321/gkine/dummy.c:22:24: note: expanded from macro 'WEAKDUMMY'
cernlib>         __attribute__ ((weak, alias (stringify(underline(fortranname_))) ))
cernlib>                               ^
cernlib> /tmp/nix-build-cernlib-2024.06.12.0.drv-0/cernlib-cernlib-2024.06.12.0-free/geant321/gkine/dummy.c:74:1: error: aliases are not supported on darwin
cernlib> WEAKDUMMY(Fluka, NUCREL, nucrel_, void);
cernlib> ^
cernlib> /tmp/nix-build-cernlib-2024.06.12.0.drv-0/cernlib-cernlib-2024.06.12.0-free/geant321/gkine/dummy.c:22:24: note: expanded from macro 'WEAKDUMMY'
cernlib>         __attribute__ ((weak, alias (stringify(underline(fortranname_))) ))
cernlib>                               ^
cernlib> /tmp/nix-build-cernlib-2024.06.12.0.drv-0/cernlib-cernlib-2024.06.12.0-free/geant321/gkine/dummy.c:75:1: error: aliases are not supported on darwin
cernlib> WEAKDUMMY(Fluka, RACO,   raco_,   void);
cernlib> ^
cernlib> /tmp/nix-build-cernlib-2024.06.12.0.drv-0/cernlib-cernlib-2024.06.12.0-free/geant321/gkine/dummy.c:22:24: note: expanded from macro 'WEAKDUMMY'
cernlib>         __attribute__ ((weak, alias (stringify(underline(fortranname_))) ))
cernlib>                               ^
cernlib> /tmp/nix-build-cernlib-2024.06.12.0.drv-0/cernlib-cernlib-2024.06.12.0-free/geant321/gkine/dummy.c:76:1: error: aliases are not supported on darwin
cernlib> WEAKDUMMY(Fluka, SAMCST, samcst_, void);
cernlib> ^
cernlib> /tmp/nix-build-cernlib-2024.06.12.0.drv-0/cernlib-cernlib-2024.06.12.0-free/geant321/gkine/dummy.c:22:24: note: expanded from macro 'WEAKDUMMY'
cernlib>         __attribute__ ((weak, alias (stringify(underline(fortranname_))) ))
cernlib>                               ^
cernlib> /tmp/nix-build-cernlib-2024.06.12.0.drv-0/cernlib-cernlib-2024.06.12.0-free/geant321/gkine/dummy.c:77:1: error: aliases are not supported on darwin
cernlib> WEAKDUMMY(Fluka, SIGEL,  sigel_,  void);
cernlib> ^
cernlib> /tmp/nix-build-cernlib-2024.06.12.0.drv-0/cernlib-cernlib-2024.06.12.0-free/geant321/gkine/dummy.c:22:24: note: expanded from macro 'WEAKDUMMY'
cernlib>         __attribute__ ((weak, alias (stringify(underline(fortranname_))) ))
cernlib>                               ^
cernlib> /tmp/nix-build-cernlib-2024.06.12.0.drv-0/cernlib-cernlib-2024.06.12.0-free/geant321/gkine/dummy.c:78:1: error: aliases are not supported on darwin
cernlib> WEAKDUMMY(Fluka, SITSAO, sitsao_, double);
cernlib> ^
cernlib> /tmp/nix-build-cernlib-2024.06.12.0.drv-0/cernlib-cernlib-2024.06.12.0-free/geant321/gkine/dummy.c:22:24: note: expanded from macro 'WEAKDUMMY'
cernlib>         __attribute__ ((weak, alias (stringify(underline(fortranname_))) ))
cernlib>                               ^
cernlib> 1 warning and 15 errors generated.
cernlib> make[2]: *** [geant321/CMakeFiles/geant321_static.dir/build.make:7212: geant321/CMakeFiles/geant321_static.dir/gkine/dummy.c.o] Error 1
cernlib> make[1]: *** [CMakeFiles/Makefile2:4894: geant321/CMakeFiles/geant321_static.dir/all] Error 2

@veprbl
Copy link
Member Author

veprbl commented Sep 2, 2024

Yeah, I guess it is still broken on darwin. For me it doesn't give any error, instead runlib silently fails.

@smancill
Copy link
Contributor

smancill commented Sep 2, 2024

It builds on Darwin applying this patch: geant321-fix-weak-alias-on-darwin.patch

But then:

$ realpath ./result
/nix/store/37idfl6144dsrlvg27fhdi67cj1dp35m-cernlib-2024.06.12.0
$ ./result/bin/cernlib
Can't find CERNLIB libraries in /nix/store/37idfl6144dsrlvg27fhdi67cj1dp35m-cernlib-2024.06.12.0/lib/cernlib/2024!
$ ./result/bin/cernlib-static
/nix/store/37idfl6144dsrlvg27fhdi67cj1dp35m-cernlib-2024.06.12.0/lib/cernlib/2024/lib/libpacklib.a

This output is pointing to non-existing path (And no shared libs?)

@veprbl
Copy link
Member Author

veprbl commented Sep 2, 2024

@smancill I've included your patch. Would you mind sending it to Ulrich and Andrii https://arxiv.org/abs/2303.07506 so that it can be included in the next GPL version?

@veprbl
Copy link
Member Author

veprbl commented Sep 2, 2024

Regarding the shared libraries, we don't build them on Linux either. We could enable it later, if there is a use case.

@smancill
Copy link
Contributor

smancill commented Sep 3, 2024

Result of nixpkgs-review pr 336597 run on x86_64-darwin 1

1 package built:
  • cernlib

@smancill
Copy link
Contributor

smancill commented Sep 3, 2024

@smancill I've included your patch. Would you mind sending it to Ulrich and Andrii https://arxiv.org/abs/2303.07506 so that it can be included in the next GPL version?

I could do that on the next days.

But there seem to be still some issues:

$ ./results/cernlib/bin/dzedit

 Calling 2024.06.12.0 version of dzedit-X11...

./results/cernlib/bin/dzedit: line 46: /nix/store/pcm4pyc55ql281alca9s0x95ixnfswzb-cernlib-2024.06.12.0/2024.06.12.0/bin/dzeX11: No such file or directory

$ ./results/cernlib/bin/paw

 Calling 2024.06.12.0 version of paw-X11

./results/cernlib/bin/paw: line 59: /nix/store/pcm4pyc55ql281alca9s0x95ixnfswzb-cernlib-2024.06.12.0/2024.06.12.0/bin/pawX11: No such file or directory
rm: cannot remove 'paw.metafile': No such file or directory

$ ./results/cernlib/bin/fatsrv

Program received signal SIGILL: Illegal instruction.

Backtrace for this error:
#0  0x100984ae6
#1  0x100983c25
#2  0x7fff207f6d7c
#3  0x7fff20704053
#4  0x7fff207045b2
Illegal instruction: 4

@veprbl
Copy link
Member Author

veprbl commented Sep 3, 2024

I think one needs some correct CERN and CERN_LEVEL to make those shell wrappers work. I'm not sure why, but the directory structure does not have any structure to support CERN_LEVEL, I don't know why.

@veprbl
Copy link
Member Author

veprbl commented Sep 3, 2024

*** buffer overflow detected ***: terminated

Program received signal SIGABRT: Process abort signal.

Backtrace for this error:
#0  0x7ff84ca495bf in ???
#1  0x7ff84ca9b7dc in __pthread_kill_implementation
#2  0x7ff84ca49515 in raise
#3  0x7ff84ca31934 in abort
#4  0x7ff84ca327f2 in __libc_message_impl.cold
#5  0x7ff84cb25a58 in __GI___fortify_fail
#6  0x7ff84cb25373 in __GI___chk_fail
#7  0x7ff84ca621b1 in __printf_buffer_flush
#8  0x7ff84ca6266b in __printf_buffer_write
#9  0x7ff84ca6a876 in __printf_buffer
#10  0x7ff84ca86a04 in __vsprintf_internal
#11  0x7ff84cb26e10 in __GI___sprintf_chk
#12  0x442abe in fmhstc_
#13  0x4166be in fmhost_
#14  0x403513 in MAIN__
#15  0x40247e in main
IOT instruction (core dumped)  result/bin/fatsrv

Looks like one needs to disable hardening. edit: that doesn't help

@veprbl
Copy link
Member Author

veprbl commented Sep 6, 2024

I think, this is okay to merge as-is. I assume, the actual libraries just still work, and, hopefully, this will alleviate some maintenance burden. To work on the binaries one needs to have more experience with cernlib to be productive about that.

@smancill
Copy link
Contributor

smancill commented Sep 6, 2024

I think, this is okay to merge as-is. I assume, the actual libraries just still work, and, hopefully, this will alleviate some maintenance burden. To work on the binaries one needs to have more experience with cernlib to be productive about that.

Yes, I agree. And it builds on Linux and Darwin.

I was just blindly trying to run binaries to see if the patch for Darwin was working on runtime.

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Sep 6, 2024
@veprbl
Copy link
Member Author

veprbl commented Sep 8, 2024

I've checked, the fatsrv has the same problem in the current cernlib-2006, and paw-X11 is not even present there.

@veprbl veprbl merged commit 4697af7 into master Sep 8, 2024
26 of 27 checks passed
@veprbl veprbl deleted the pr/cern_2024 branch September 8, 2024 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 10.rebuild-linux: 1-10 10.rebuild-linux: 1 11.by: package-maintainer This PR was created by the maintainer of the package it changes 12.approvals: 1 This PR was reviewed and approved by one reputable person
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants