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

Latest version FTBS on Debian/Trixie (gcc 14) #147

Open
Trophime opened this issue Oct 17, 2024 · 2 comments
Open

Latest version FTBS on Debian/Trixie (gcc 14) #147

Trophime opened this issue Oct 17, 2024 · 2 comments

Comments

@Trophime
Copy link

Hi,
I'm trying to recompile latest version 3.0a4.
I run with issue with fileno in:

  • src/XML/src-gen/FMI3/lex.yyfmi3.c
  • src/XML/src-gen/FMI2/lex.yyfmi2.c
  • src/XML/src-gen/FMI1/lex.yyfmi1.c
    Add in each file this line int fileno(FILE *stream); fix the compilation error.

Now, I'm stuck with error in Minizip:

  • In miniunz.c, I add #include <sys/stat.h> before call to mkdir in unix and apple in mymkdir function
  • A more problematic issue:
/home/feelpp/salome/SALOME-master-native-DBn/a/SOURCES/FMILibrary/ThirdParty/Minizip/minizip/zip.c:1249:28: error: assignment to ‘const long unsigned int *’ from incompatible pointer type ‘const z_crc_t *’ {aka ‘const unsigned int *’} [-Wincompatible-pointer-types]
 1249 |         zi->ci.pcrc_32_tab = get_crc_table();
      |                            ^
make[2]: *** [Config.cmake/Minizip/CMakeFiles/minizip.dir/build.make:135: Config.cmake/Minizip/CMakeFiles/minizip.dir/__/__/ThirdParty/Minizip/minizip/zip.c.o] Error 1

Could you help me with that error?
Would it be possible to use a "standard" version of Minizip?
Best

@filip-stenstrom
Copy link
Collaborator

I can replicate these issues on Trixie with gcc 14.

fileno: Problem seems to be that we should define #define _POSIX_C_SOURCE 200809L before including stdio.h for gcc 14, or use some appropriate -std=....

mkdir/mymkdir: Didn't look into why we need sys/stat.h, also just added it for now to make it compile.

Pointer type mismatch error: Seems also to be gcc being stricter. Type casting the right hand side makes it compile, but didn't look much into the problem. Recompiling will show some type mismatch in FMIL code as well. Also type casting there (e.g. just (void*)) makes FMIL compile and tests pass.

Using a standard version of Minizip: Unfortunately this is not yet possible. There is a flag for FMILIB_FIND_PACKAGE_ZLIB and a PR open for Expat, but nothing for Minizip yet.

@filip-stenstrom
Copy link
Collaborator

We don't expect to have a fix anytime soon, since we're still on older versions of gcc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants