Why ldc-1.20.1 is always building runtime to x86_64 even when I'm running an i686 linux?

dangbinghoo dangbinghoo at gmail.com
Mon Apr 20 07:20:32 UTC 2020


On Friday, 17 April 2020 at 12:22:07 UTC, kinke wrote:
> On Friday, 17 April 2020 at 09:32:32 UTC, dangbinghoo wrote:
>> so, the ldc2 now is sticking to x86_64 for PC now?
>
> Of course not. With the little information you gave, it looks 
> like the LLVM you use defaults to the x86_64 triple (can be 
> configured via CMake when building LLVM), that's why you need 
> -mtriple to build the libs, and later too when compiling any D 
> file.

thank you. I just tried to set llvm default tripple to 
`i686-linux-gnu`, and when I trying to build ldc2, again failed 
with runtime building:

```
Warning: unknown target OS: gnu
Warning: Assuming critical section size = 24 bytes
core/stdc/time.d(151): Error: undefined identifier `time_t`, did 
you mean function `time`?
core/stdc/time.d(151): Error: undefined identifier `time_t`, did 
you mean function `time`?
core/stdc/time.d(153): Error: undefined identifier `time_t`, did 
you mean function `time`?
core/stdc/time.d(153): Error: undefined identifier `tm`
core/stdc/time.d(155): Error: undefined identifier `time_t`, did 
you mean function `time`?
core/stdc/time.d(155): Error: undefined identifier `time_t`, did 
you mean function `time`?
core/stdc/time.d(158): Error: undefined identifier `tm`
core/stdc/time.d(160): Error: undefined identifier `time_t`, did 
you mean function `time`?
core/stdc/time.d(162): Error: undefined identifier `tm`
core/stdc/time.d(162): Error: undefined identifier `time_t`, did 
you mean function `time`?
core/stdc/time.d(164): Error: undefined identifier `tm`
core/stdc/time.d(164): Error: undefined identifier `time_t`, did 
you mean function `time`?
core/stdc/time.d(166): Error: undefined identifier `tm`
core/stdc/wchar_.d(125): Error: undefined identifier `wchar_t`, 
did you mean `dchar`?
core/stdc/wchar_.d(128): Error: undefined identifier `wchar_t`, 
did you mean `dchar`?
core/stdc/wchar_.d(131): Error: undefined identifier `FILE`
core/stdc/wchar_.d(131): Error: undefined identifier `wchar_t`, 
did you mean `dchar`?
core/stdc/wchar_.d(133): Error: undefined identifier `FILE`
core/stdc/wchar_.d(133): Error: undefined identifier `wchar_t`, 
did you mean `dchar`?
core/stdc/wchar_.d(135): Error: undefined identifier `wchar_t`, 
did you mean `dchar`?
[125/216] Building CXX object 
runtime/CMakeFiles/ldc-jit-rt-so.dir/__/gen/passes/GarbageCollect2Stack.cpp.o
ninja: build stopped: subcommand failed
```

I don't know what's the real instructions for building an LDC for 
i686.  I'm using a docker env. with system image ubuntu 14.04 
i386 arch and running on x86_64 archlinux host, is this my docker 
env causes such problems?


thanks!

~~~~
binghoo dang


More information about the digitalmars-d-ldc mailing list