compiler-explorer: ARM compiler gives and error with only "#include " as code
When using the ARM gcc 5.4.1 (none) compiler, just having #include <cstdllib>
as code, leads to the following compiler error:
ERROR: ld.so: object '/compiler-explorer/c-preload/libpreload.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/compiler-explorer/c-preload/libpreload.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
In file included from /opt/compiler-explorer/gcc-arm-none-eabi-5_4-2016q3/arm-none-eabi/include/stdlib.h:19:0,
from /opt/compiler-explorer/gcc-arm-none-eabi-5_4-2016q3/arm-none-eabi/include/c++/5.4.1/cstdlib:72,
from <source>:1:
/usr/include/x86_64-linux-gnu/sys/cdefs.h:23:23: fatal error: features.h: No such file or directory
compilation terminated.
Compiler returned: 1
Link to compiler explorer: https://godbolt.org/#g:!((g:!((g:!((h:codeEditor,i:(fontScale:0.62208,j:1,lang:c%2B%2B,source:'%23include+<cstdlib> '),l:‘5’,n:‘0’,o:‘C%2B%2B+source+%231’,t:‘0’)),k:50,l:‘4’,n:‘0’,o:‘’,s:0,t:‘0’),(g:!((g:!((h:compiler,i:(compiler:arm541,filters:(b:‘0’,binary:‘1’,commentOnly:‘0’,demangle:‘0’,directives:‘0’,execute:‘1’,intel:‘0’,trim:‘1’),lang:c%2B%2B,libs:!(),options:‘-std%3Dc%2B%2B11’,source:1),l:‘5’,n:‘0’,o:‘ARM+gcc+5.4.1+(none)+(Editor+%231,+Compiler+%231)+C%2B%2B’,t:‘0’)),k:50,l:‘4’,m:50,n:‘0’,o:‘’,s:0,t:‘0’),(g:!((h:output,i:(compiler:1,editor:1,wrap:‘1’),l:‘5’,n:‘0’,o:‘%231+with+ARM+gcc+5.4.1+(none)’,t:‘0’)),header:(),l:‘4’,m:50,n:‘0’,o:‘’,s:0,t:‘0’)),k:50,l:‘3’,n:‘0’,o:‘’,t:‘0’)),l:‘2’,n:‘0’,o:‘’,t:‘0’)),version:4
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 29 (23 by maintainers)
Commits related to this issue
- Use `-I` with ARM compilers. See #989 — committed to compiler-explorer/compiler-explorer by mattgodbolt 6 years ago
- Use `-I` with ARM compilers. See #989 — committed to compiler-explorer/compiler-explorer by mattgodbolt 6 years ago
Sure enough!
The flag is controlled per compiler/compiler group, so adding
.includeFlag=-i
where desirable should fix override the default. 😃