animetosho / ParPar

High performance PAR2 create client for NodeJS
190 stars 19 forks source link

Error Compiling gf_w16.c #12

Closed fuzzy80211 closed 6 years ago

fuzzy80211 commented 6 years ago

Attempted to compile the current ParPar (as of commit b8961c8) on CentOS Linux release 7.4.1708 (Core). I used git clone to download the files and when i attempt to compile i get the error listed below.

Specifically it appears to be related to this: ../gf-complete/gf_w16.c:390:5: error: ‘for’ loop initial declarations are only allowed in C99 mode for(int i=0; i<16; i++) { ^ ../gf-complete/gf_w16.c:390:5: note: use option -std=c99 or -std=gnu99 to compile your code

If i move the initialization of i out of the for loop and just set i=0 in the for loop, everything compiles correctly.

I apologize if my report isn't detailed enough as I am new to github.

[root@x.x.x.x ParPar]# node-gyp rebuild gyp info it worked if it ends with ok gyp info using node-gyp@3.6.2 gyp info using node@6.12.3 | linux | x64 gyp info spawn /usr/bin/python2 gyp info spawn args [ '/usr/lib/node_modules/node-gyp/gyp/gyp_main.py', gyp info spawn args 'binding.gyp', gyp info spawn args '-f', gyp info spawn args 'make', gyp info spawn args '-I', gyp info spawn args '/root/File/ParPar/build/config.gypi', gyp info spawn args '-I', gyp info spawn args '/usr/lib/node_modules/node-gyp/addon.gypi', gyp info spawn args '-I', gyp info spawn args '/root/.node-gyp/6.12.3/include/node/common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=/root/.node-gyp/6.12.3', gyp info spawn args '-Dnode_gyp_dir=/usr/lib/node_modules/node-gyp', gyp info spawn args '-Dnode_lib_file=/root/.node-gyp/6.12.3/<(target_arch)/node.lib', gyp info spawn args '-Dmodule_root_dir=/root/File/ParPar', gyp info spawn args '-Dnode_engine=v8', gyp info spawn args '--depth=.', gyp info spawn args '--no-parallel', gyp info spawn args '--generator-output', gyp info spawn args 'build', gyp info spawn args '-Goutput_dir=.' ] gyp info spawn make gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] make: Entering directory /root/File/ParPar/build' CC(target) Release/obj.target/gf-complete/gf-complete/gf.o CC(target) Release/obj.target/gf-complete/gf-complete/gf_w16.o ../gf-complete/gf_w16.c: In function ‘gf_w16_split_init’: ../gf-complete/gf_w16.c:390:5: error: ‘for’ loop initial declarations are only allowed in C99 mode for(int i=0; i<16; i++) { ^ ../gf-complete/gf_w16.c:390:5: note: use option -std=c99 or -std=gnu99 to compile your code make: *** [Release/obj.target/gf-complete/gf-complete/gf_w16.o] Error 1 make: Leaving directory/root/File/ParPar/build' gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/node-gyp/lib/build.js:258:23) gyp ERR! stack at emitTwo (events.js:106:13) gyp ERR! stack at ChildProcess.emit (events.js:191:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:219:12) gyp ERR! System Linux 3.10.0-514.10.2.el7.x86_64 gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "rebuild" gyp ERR! cwd /root/File/ParPar gyp ERR! node -v v6.12.3 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok

animetosho commented 6 years ago

Thank you for the issue report!