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
Compiliation fails on ARM platforms (invalid type conversion) #1689
Comments
Thanks. I think it's not the two's complement, but 256-val, as negative values underflow. (Two's complement is the representation in assembly, as far as I know.) However, I'd like to look at the code first and see why the negative value was used in the first place. |
How are you doing the compilation? Is that cross-compilation from a different platform for example? Which ARM device exactly are you using/targeting? I have an old Raspberry Pi that I can possibly use to test. The reason I ask is that while the compilation error can be made to disappear, I would still be worried that the other uses of char in those functions may be silently affected and so I'd like to test. |
I cross-compiled it on x86_64 for armv7l using Void Linux’s package building tool xbps-src. Void Linux cross compiles all packages for armv6l, armv7l, aarch64. So I didn’t target a specific device. There is a problem with the cross-compiled wxWidgets (wx-config returning the cross-build paths when used natively) I tried to fix and ran into this issue when cross-building all packages depending on wxWidgets. |
Any news on this? :) |
Sorry. I dropped the ball. I'll follow up on all on this in Jan. I think there are some small changes to be made. |
Note to self: to force at least a warning message on an Intel machine, you can use "-funsigned-char -W -Wall":
The fix will be to use positive values and "unsigned char" as the type. A patch is on the way. Thanks for reporting. |
Compilation for ARM platforms using gcc 7.2 fails with
invalid conversion from 'signed char*' to 'const char*'
. I believe this is because on ARM the char data type is unsigned by default, but insrc/formats/pngformat.cpp
andsrc/formats/yasaraformat.cpp
negative values are assigned. I used Open Babel version 2.4.1 but it’s still the same in the latest source files.The following patch which replaces the negative integer with its two’s complement works, but I have no idea if that breaks something else. The best solution would probably be to use
singed char
.The text was updated successfully, but these errors were encountered: