Closed xcom169 closed 1 year ago
thanks @xcom169, I've added the missing semicolons, and it should build now.
This escaped detection so far because I haven't tested a build on a big-endian machine, so that code that failed is #ifdef'd out. Can you confirm you're actually building on a big-endian CPU? Otherwise, if you're building on x86 for example, the __LITTLE_ENDIAN__
flag should be set, and that code should not have actually been encountered.
[cont'd] if you do have a big endian machine, it'd be good to know if that build runs okay and has no bugs that the little endian build doesn't also. The last time I tested this on big endian was about 10 years ago. I've got an old G4 iMac in storage with a dead hard drive I've been meaning to resurrect to test the BE build
Hello.
I used a x86 CPU and the CMake script to build it.
On Fri, 20 Jan 2023 at 19:54, bentorkington @.***> wrote:
thanks @xcom169 https://github.com/xcom169, I've added the missing semicolons, and it should build now.
This escaped detection so far because I haven't tested a build on a big-endian machine, so that code that failed is #ifdef'd out. Can you confirm you're actually building on a big-endian CPU? Otherwise, if you're building on x86 for example, the __LITTLE_ENDIAN__ flag should be set, and that code should not have actually been encountered.
— Reply to this email directly, view it on GitHub https://github.com/bentorkington/sf2ww/issues/6#issuecomment-1398804315, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEH2G2WDVF4TXN7QR4L4WJDWTLNPHANCNFSM6AAAAAAUBOQY6I . You are receiving this because you were mentioned.Message ID: @.***>
Okay, I guess something's wrong with the script if it's trying to compile for BE, will have a look, thanks
Can't repro this with gcc-10 on Debian. Check your compiler is defining either __i386__
or __amd64__
I guess
Hello!
I tried again with GCC 12. Now it's better but there is another issue with cmocka.h :
sf2ww/FBTests/main.c:13:10: fatal error: cmocka.h: No such file or directory
13 | #include ~~~~~
compilation terminated.
make[2]: [FBTests/CMakeFiles/test-redhammer.dir/build.make:76:
FBTests/CMakeFiles/test-redhammer.dir/main.c.o] Error
1
make[1]: [CMakeFiles/Makefile2:126:
FBTests/CMakeFiles/test-redhammer.dir/all] Error 2
make: *** [Makefile:101: all] Error 2
On Sat, 21 Jan 2023 at 04:44, bentorkington @.***> wrote:
Can't repro this with gcc-10 on Debian. Check your compiler is defining either i386 or amd64 I guess
— Reply to this email directly, view it on GitHub https://github.com/bentorkington/sf2ww/issues/6#issuecomment-1399167867, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEH2G2TB6KJRQILZHUPBTCDWTNLQZANCNFSM6AAAAAAUBOQY6I . You are receiving this because you were mentioned.Message ID: @.***>
I need to update the docs to include the cmocka dependency (for unit tests) and also allow the project to build without tests if this dep is not found. In the meantime, cmocha is available for Arch Linux, so you should be able to install that to get the build working
@xcom169 to help figure out what caused the initial issue, can you please run gcc -march=native -dM -E - </dev/null
and paste the output here? Thanks.
gcc -march=native -dM -E - </dev/null
6.47517511943802511092443895822764655e-4966F128
((double)4.94065645841246544176568792868221372e-324L)
3.64519953188247460252840593361941982e-4951F64x
((double)1.79769313486231570814527423731704357e+308L)
On Sat, 21 Jan 2023 at 19:15, bentorkington @.***> wrote:
@xcom169 https://github.com/xcom169 to help figure out what caused the initial issue, can you please run gcc -march=native -dM -E - </dev/null and paste the output here? Thanks.
— Reply to this email directly, view it on GitHub https://github.com/bentorkington/sf2ww/issues/6#issuecomment-1399303874, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEH2G2ROFD3QCTAJQNZEGDLWTQRTFANCNFSM6AAAAAAUBOQY6I . You are receiving this because you were mentioned.Message ID: @.***>
Thanks! Installing cmocka helped.
@xcom169 thanks for that Timár
Looks like compilers aren't consistent about defining __LITTLE_ENDIAN__
so I need to use a more reliable way
Hello All,
Compilation fails with GCC-11 on Arch Linux:
RedHammer/redhammer.c:193:15: error: expected ‘;’ before ‘}’ token 193 | return num | ^ | ; 194 | #endif 195 | } | ~
RedHammer/redhammer.c:202:15: error: expected ‘;’ before ‘}’ token 202 | return num | ^ | ; 203 | #endif 204 | } | ~