Skip to content

Compilation error in src/gdl2gdl.cpp with clang 19 #1967

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

Closed
thierry-FreeBSD opened this issue Jan 14, 2025 · 3 comments
Closed

Compilation error in src/gdl2gdl.cpp with clang 19 #1967

thierry-FreeBSD opened this issue Jan 14, 2025 · 3 comments
Labels
todo-test WIP Work In Progress: PR acceptance will be considered when this label is removed.

Comments

@thierry-FreeBSD
Copy link
Member

Trying to compile gdl-v1.1 on FreeBSD-CURRENT (with clang-19) fails with these errors:

--- src/CMakeFiles/gdl.dir/gdl2gdl.cpp.o ---
/usr/ports/science/gnudatalanguage/work/gdl-v1.1/src/gdl2gdl.cpp:422:81: error: comparison between pointer and integer ('messageBoxHandle' (aka '__mq *') and 'int')
  422 |   if ((h = mq_open(name.c_str(), O_RDONLY | O_CREAT, QUEUE_PERMISSIONS, &attr)) == -1) {
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~
/usr/ports/science/gnudatalanguage/work/gdl-v1.1/src/gdl2gdl.cpp:433:79: error: comparison between pointer and integer ('messageBoxHandle' (aka '__mq *') and 'int')
  433 |   if ((gdl2gdlMessageBoxHandle = mq_open(g2gClientMailbox.c_str(), O_WRONLY)) == -1) {
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~
2 errors generated.
*** [src/CMakeFiles/gdl.dir/gdl2gdl.cpp.o] Error code 1

make[2]: stopped making "src/CMakeFiles/gdl.dir/build" in /usr/ports/science/gnudatalanguage/work/.build
make[2]: 1 error

make[2]: stopped making "src/CMakeFiles/gdl.dir/build" in /usr/ports/science/gnudatalanguage/work/.build
*** [src/CMakeFiles/gdl.dir/all] Error code 2

make[1]: stopped making "all" in /usr/ports/science/gnudatalanguage/work/.build
make[1]: 1 error

make[1]: stopped making "all" in /usr/ports/science/gnudatalanguage/work/.build
*** [all] Error code 2

make: stopped making "all" in /usr/ports/science/gnudatalanguage/work/.build
make: 1 error

make: stopped making "all" in /usr/ports/science/gnudatalanguage/work/.build
@GillesDuvert
Copy link
Contributor

mq_open seems to return a different type on BSD than on other platforms. to be cured. Thanks.

@GillesDuvert GillesDuvert added the bug Something isn't working label Jan 21, 2025
GillesDuvert pushed a commit to GillesDuvert/gdl that referenced this issue Feb 1, 2025
@GillesDuvert
Copy link
Contributor

@thierry-FreeBSD pls check #1977 and confirm it's OK.
regards.

@GillesDuvert GillesDuvert added todo-test WIP Work In Progress: PR acceptance will be considered when this label is removed. and removed bug Something isn't working labels Feb 1, 2025
GillesDuvert added a commit that referenced this issue Feb 2, 2025
Co-authored-by: Giloo <gildas@localhost>
@thierry-FreeBSD
Copy link
Member Author

Great!
Indeed commit c19e323 fixes this error, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
todo-test WIP Work In Progress: PR acceptance will be considered when this label is removed.
Projects
None yet
Development

No branches or pull requests

2 participants