CaGe-graph / CaGe

The Chemical and abstract Graph environment
9 stars 2 forks source link

install Cage on Arch wsl #53

Open lichengzhang2 opened 4 days ago

lichengzhang2 commented 4 days ago

Today, I want to install Cage on my Arch wsl , but I encountered the following error. I'm not sure what the issue is.

/usr/sbin/gcc -fPIC  -I/usr/lib/jvm/java-8-openjdk/include -I/usr/lib/jvm/java-8-openjdk/include/linux -w -shared NativeCaGePipe.c NativeEmbedEmbedder.c NativeEmbeddableGraph.c NativeEdgeIterator.c NativePlanarWriter.c NativeWritegraphWriter.c NativeCMLWriter.c NativePDBWriter.c Pipe.c BufferedFDInputStream.c BufferedFDOutputStream.c get_element.c check_graph.c graph.c read_graphs.c dstring.c cmd_vector.c pipe_tools.c file_tools.c malloc.c jbytes.c j_debug.c j_error_exit.c Systoolbox.c -o libCaGe.so
NativeCaGePipe.c: In function 'get_status':
NativeCaGePipe.c:97:3: error: implicit declaration of function 'setJNIEnv'; did you mean 'setenv'? [-Wimplicit-function-declaration]
   97 |   setJNIEnv (env);
      |   ^~~~~~~~~
      |   setenv
NativeCaGePipe.c:103:7: error: implicit declaration of function 'error_exit'; did you mean 'on_exit'? [-Wimplicit-function-declaration]
  103 |       error_exit ("status information lost", "io/IOException");
      |       ^~~~~~~~~~
      |       on_exit
NativeEmbedEmbedder.c: In function 'getErrFilename':
NativeEmbedEmbedder.c:85:11: error: implicit declaration of function 'close'; did you mean 'pclose'? [-Wimplicit-function-declaration]
   85 |           close (fd);
      |           ^~~~~
      |           pclose
NativeEmbedEmbedder.c: In function 'finish_errfile':
NativeEmbedEmbedder.c:109:11: error: implicit declaration of function 'unlink' [-Wimplicit-function-declaration]
  109 |           unlink (*err_filename);
      |           ^~~~~~
NativeEmbedEmbedder.c: In function 'Java_cage_NativeEmbedEmbedder_nEmbed2D':
NativeEmbedEmbedder.c:252:7: error: implicit declaration of function 'setJNIEnv'; did you mean 'setenv'? [-Wimplicit-function-declaration]
  252 |       setJNIEnv (env);
      |       ^~~~~~~~~
      |       setenv
NativeEmbeddableGraph.c: In function 'Java_cage_NativeEmbeddableGraph_toBytes':
NativeEmbeddableGraph.c:239:3: error: implicit declaration of function 'write_writegraph_dstring' [-Wimplicit-function-declaration]
  239 |   write_writegraph_dstring (jlong2adr (nGraph, void *), &encoding, 0, 1, 0, 0);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~
NativePlanarWriter.c: In function 'Java_cage_writer_NativePlanarWriter_nEncodeGraph':
NativePlanarWriter.c:73:3: error: implicit declaration of function 'setJNIEnv'; did you mean 'setenv'? [-Wimplicit-function-declaration]
   73 |   setJNIEnv (env);
      |   ^~~~~~~~~
      |   setenv
NativeWritegraphWriter.c: In function 'Java_cage_writer_NativeWritegraphWriter_nEncodeGraph':
NativeWritegraphWriter.c:35:3: error: implicit declaration of function 'setJNIEnv'; did you mean 'setenv'? [-Wimplicit-function-declaration]
   35 |   setJNIEnv (env);
      |   ^~~~~~~~~
      |   setenv
NativeCMLWriter.c: In function 'Java_cage_writer_NativeCMLWriter_nEncodeGraph':
NativeCMLWriter.c:139:3: error: implicit declaration of function 'setJNIEnv'; did you mean 'setenv'? [-Wimplicit-function-declaration]
  139 |   setJNIEnv (env);
      |   ^~~~~~~~~
      |   setenv
NativePDBWriter.c: In function 'Java_cage_writer_NativePDBWriter_nEncodeGraph':
NativePDBWriter.c:85:3: error: implicit declaration of function 'setJNIEnv'; did you mean 'setenv'? [-Wimplicit-function-declaration]
   85 |   setJNIEnv (env);
      |   ^~~~~~~~~
      |   setenv
Pipe.c: In function 'Java_lisken_systoolbox_Pipe_startPipe':
Pipe.c:39:3: error: implicit declaration of function 'setJNIEnv'; did you mean 'setenv'? [-Wimplicit-function-declaration]
   39 |   setJNIEnv (env);
      |   ^~~~~~~~~
      |   setenv
BufferedFDInputStream.c: In function 'Java_lisken_systoolbox_BufferedFDInputStream_init':
BufferedFDInputStream.c:28:3: error: implicit declaration of function 'setJNIEnv'; did you mean 'setenv'? [-Wimplicit-function-declaration]
   28 |   setJNIEnv (env);
      |   ^~~~~~~~~
      |   setenv
BufferedFDOutputStream.c: In function 'Java_lisken_systoolbox_BufferedFDOutputStream_init':
BufferedFDOutputStream.c:27:3: error: implicit declaration of function 'setJNIEnv'; did you mean 'setenv'? [-Wimplicit-function-declaration]
   27 |   setJNIEnv (env);
      |   ^~~~~~~~~
      |   setenv
pipe_tools.c: In function 'establish_pipe':
pipe_tools.c:147:11: error: implicit declaration of function 'error_exit_subproc' [-Wimplicit-function-declaration]
  147 |           error_exit_subproc ("can't change into rundir", "io/IOException");
      |           ^~~~~~~~~~~~~~~~~~
make: *** [Makefile:56: libCaGe.so] Error 1

-  'make' failure, aborting.

But it seems to be quite successful on my Ubuntu WSl. image

lichengzhang2 commented 3 days ago

I guess gcc 14 has some new things.