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

CMAKE compilation error for snaphu time import due to new gcc compiler version (14.1.0). #879

Open
SpiderPigzz opened this issue Sep 6, 2024 · 0 comments

Comments

@SpiderPigzz
Copy link

Opening an issue for others who faced the same thing. Unable to run the make command after CMAKE, it stops around 80% due to error caused by time as can be seen below:

home/eos-rs/insarscripts/isce2-code/isce2_wildfly_latest/isce2/contrib/Snaphu/src/snaphu_io.c:1474:5: error: implicit declaration of function 'time' [-Wimplicit-function-declaration]
 1474 |     time(t);
      |     ^~~~
/home/eos-rs/insarscripts/isce2-code/isce2_wildfly_latest/isce2/contrib/Snaphu/src/snaphu_io.c:29:1: note: 'time' is defined in header '<time.h>'; this is probably fixable by adding '#include <time.h>'
   28 | #include "snaphu.h"
  +++ |+#include <time.h>
   29 | 
/home/eos-rs/insarscripts/isce2-code/isce2_wildfly_latest/isce2/contrib/Snaphu/src/snaphu_io.c:1475:42: error: implicit declaration of function 'ctime' [-Wimplicit-function-declaration]
 1475 |     fprintf(fp,"# Log file generated %s",ctime(t));
      |                                          ^~~~~
/home/eos-rs/insarscripts/isce2-code/isce2_wildfly_latest/isce2/contrib/Snaphu/src/snaphu_io.c:1475:42: note: 'ctime' is defined in header '<time.h>'; this is probably fixable by adding '#include <time.h>'
make[2]: *** [components/contrib/Snaphu/CMakeFiles/snaphu.dir/build.make:132: components/contrib/Snaphu/CMakeFiles/snaphu.dir/src/snaphu_io.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:4422: components/contrib/Snaphu/CMakeFiles/snaphu.dir/all] Error 2
make: *** [Makefile:166: all] Error 2

Fix is to change the gcc_linux-64 and gxx_linux-64 version to 13.2.0. It treats the error as a warning and the compilation continues smoothly.

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

1 participant