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

Compilation with GCC 14 #24

Closed
dialvarezs opened this issue May 31, 2024 · 1 comment · Fixed by #25
Closed

Compilation with GCC 14 #24

dialvarezs opened this issue May 31, 2024 · 1 comment · Fixed by #25
Labels
bug Something isn't working seqfu_2.x

Comments

@dialvarezs
Copy link
Contributor

Describe the bug
Seqfu doesn't compile under GCC 14

Environment:

  • Linux (OpenSUSE Tumbleweed, GCC 14.1.0)
  • source
  • 1.20.3

Additional context
GCC 14 introduced several changes to make compilation stricter by default (https://gcc.gnu.org/gcc-14/porting_to.html). So, as it is right now, seqfu doesn't compile, trowing errors of "incompatible pointer type":

...
/home/dxh/.cache/nim/sfu_r/@[email protected]@[email protected]@sdocopt.nim.c: In function 'single_match__OOZOnimbleZpkgs50Zdocopt4548O55O4945515655f49ae4955f51b55545048c55564952cf5252a5350d51d5749b56574854e57Zdocopt_u2739':
/home/dxh/.cache/nim/sfu_r/@[email protected]@[email protected]@sdocopt.nim.c:5364:51: error: assignment to 'tyObject_PatterncolonObjectType___A9bHEBNpFTjEgqdXkaIrmFg *' from incompatible pointer type 'tyObject_ArgumentcolonObjectType___Ln77EzbQ9ccyLZm9ceI9c3dMw *' [-Wincompatible-pointer-types]
 5364 |                                         colontmp_ = argument__OOZOnimbleZpkgs50Zdocopt4548O55O4945515655f49ae4955f51b55545048c55564952cf5252a5350d51d5749b56574854e57Zdocopt_u316(colontmpD__2, (*pattern).value);
      |                                                   ^
/home/dxh/.cache/nim/sfu_r/@[email protected]@[email protected]@sdocopt.nim.c: In function 'single_match__OOZOnimbleZpkgs50Zdocopt4548O55O4945515655f49ae4955f51b55545048c55564952cf5252a5350d51d5749b56574854e57Zdocopt_u2751':
/home/dxh/.cache/nim/sfu_r/@[email protected]@[email protected]@sdocopt.nim.c:5570:59: error: assignment to 'tyObject_PatterncolonObjectType___A9bHEBNpFTjEgqdXkaIrmFg *' from incompatible pointer type 'tyObject_CommandcolonObjectType___HvW7Ln9aD64gF1ZsUHj9bz6g *' [-Wincompatible-pointer-types]
 5570 |                                                 colontmp_ = command__OOZOnimbleZpkgs50Zdocopt4548O55O4945515655f49ae4955f51b55545048c55564952cf5252a5350d51d5749b56574854e57Zdocopt_u622(colontmpD__4, colontmpD__5);
      |                                                           ^
CC: ../../../../../../home/dxh/others/spack/opt/spack/linux-opensusetumbleweed2.39-zen3/gcc-14.1.0/nim-2.0.4-gy6owgpzwwf7f3hriyepopcqbo5zosiz/lib/pure/collections/rtarrays.nim
CC: ../../../../../../home/dxh/others/spack/opt/spack/linux-opensusetumbleweed2.39-zen3/gcc-14.1.0/nim-2.0.4-gy6owgpzwwf7f3hriyepopcqbo5zosiz/lib/impure/re.nim
CC: seqfu_utils.nim
CC: ../../../../../../home/dxh/others/spack/opt/spack/linux-opensusetumbleweed2.39-zen3/gcc-14.1.0/nim-2.0.4-gy6owgpzwwf7f3hriyepopcqbo5zosiz/lib/pure/md5.nim
CC: ../../../../../../home/dxh/others/spack/opt/spack/linux-opensusetumbleweed2.39-zen3/gcc-14.1.0/nim-2.0.4-gy6owgpzwwf7f3hriyepopcqbo5zosiz/lib/pure/streams.nim
CC: ../../../../../../home/dxh/others/spack/opt/spack/linux-opensusetumbleweed2.39-zen3/gcc-14.1.0/nim-2.0.4-gy6owgpzwwf7f3hriyepopcqbo5zosiz/lib/pure/json.nim
CC: ../../../../../../home/dxh/others/spack/opt/spack/linux-opensusetumbleweed2.39-zen3/gcc-14.1.0/nim-2.0.4-gy6owgpzwwf7f3hriyepopcqbo5zosiz/lib/pure/encodings.nim
CC: ../.nimble/pkgs2/terminaltables-0.1.1-5fdf88d70cc1d904291204cd4f9e2adf992fb564/terminaltables.nim
CC: stats_utils.nim
Error: execution of an external compiler program 'gcc -c  -w -fmax-errors=3 -pthread -O3 -fno-strict-aliasing -fno-ident -fno-math-errno   -I/home/dxh/others/spack/opt/spack/linux-opensusetumbleweed2.39-zen3/gcc-14.1.0/nim-2.0.4-gy6owgpzwwf7f3hriyepopcqbo5zosiz/lib -I/tmp/dxh/spack-stage/spack-stage-seqfu-1.20.3-qgwbqiyiqcgduapg6nsxv7b7pueabctv/spack-src/src -o /home/dxh/.cache/nim/sfu_r/@[email protected]@[email protected]@sdocopt.nim.c.o /home/dxh/.cache/nim/sfu_r/@[email protected]@[email protected]@sdocopt.nim.c' failed with exit code: 1


make: *** [Makefile:55: bin/seqfu] Error 1
/home/dxh/.cache/nim/sfu_r/@mstats_utils.nim.c: In function 'getFastxStats__stats95utils_u616':
/home/dxh/.cache/nim/sfu_r/@mstats_utils.nim.c:541:31: error: assignment to 'tyObject_kseq_t__JyA8mh6WjaqGke0VEiWn2Q *' from incompatible pointer type 'kseq_t *' [-Wincompatible-pointer-types]
  541 |                         rec_2 = kseq_init(fp);
      |                               ^
/home/dxh/.cache/nim/sfu_r/@mstats_utils.nim.c:552:66: error: passing argument 1 of 'kseq_read' from incompatible pointer type [-Wincompatible-pointer-types]
  552 |                                                 T19_ = kseq_read(rec_2);
      |                                                                  ^~~~~
      |                                                                  |
      |                                                                  tyObject_kseq_t__JyA8mh6WjaqGke0VEiWn2Q *
...

Some of the errors come from docopt, so I guess it is not so easy to solve, so for now I propose to add --passC:"-Wno-error=incompatible-pointer-types" to NIMPARAM in the Makefile. If you are ok with it, I can make a PR.

Disclaimer
I really like seqfu and I would like it to be available in spack. I made a PR for that (spack/spack#44445), and the mantainers asked me if we can solve this in upstream instead of patching it in the package there.

@telatin
Copy link
Owner

telatin commented May 31, 2024

Thanks a million!
Docopt is a tricky part, I would like to plan a major update of Seqfu and I still don't know if docopt is worth the pain :)

Yes please, go ahead with the PR and I'll be happy to merge

EDIT: I will try and check how to fix stats_utils

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working seqfu_2.x
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants