DMD uses 'gcc' to perform the link step. On freebsd 11 (and likely other earlier versions, unexplored), gcc -m32 fails to link, looking at 64 bit library paths instead.
This combination results in freebsd 11 32 non-functional. Either 'clang' or 'cc' work just fine. For the auto-testers, they're currently running with CC set to cc in their environment. That's not particularly acceptable an out of the box experience for users of that platform.
IMHO, DMD needs to use 'cc' by default rather than gcc. Without having double checked, I suspect that will work on any relatively modern platform without causing regressions.
Comment #1 by issues.dlang — 2018-02-24T08:32:20Z
Looking at the source code for the compiler, the only place I see that the CC environment variable is used is in src/dmd/link.d, and it looks like back in October, Martin changed it so that it uses cc if CC is not set, and if I have neither gcc nor g++ in my PATH on my 64-bit FreeBSD system, it compiles just fine. I know that that didn't used to be the case, but it appears to be so now - presumably thanks to Martin's changes to link.d. So, I don't know why the auto-tester would be trying to use gcc or g++. There is some logic in posix.mak where it tries to figure out whether clang or gcc is being used - primarily so that it can figure out which compiler flags to use, I think. Glancing over it, it looks like it uses c++ --version to figure that out, though if HOST_CXX is set, it uses that instead of c++, and it might use CXX if that's set. So, maybe the problem with the auto-tester relates to the makefile somehow? Certainly, from what I can tell, the issue is not as simple as dmd using gcc by default now if CC isn't set.
Does the environment for the autoster have CC, CXX, HOST_CC, or HOST_CXX set to gcc or g++?
Comment #2 by issues.dlang — 2018-02-24T09:13:08Z
However, it does look like test/d_do_test.d hardcodes g++ if CC isn't set, so that fails if g++ isn't available.
I wasn't thinking about this last night, but the behavior that's in question isn't master or stable branch, but rather 2.068.2. That compiler's behavior is where things are going wrong. The problem, as far as the auto-tester is concerned, has been worked around sufficiently. I'm not sure if there's any remaining issues with the tip of tree builds.
Comment #7 by issues.dlang — 2018-02-25T00:56:13Z
Well, I'm able to build and run the tests for Phobos, druntime, and dmd without having gcc installed on a 64-bit FreeBSD 11.1 system. I'd guess that that works for 32-bit as well (aside from the test failures that are being worked through), but I don't know. 2.068.2 certainly won't work that way though.
Comment #8 by github-bugzilla — 2018-04-06T21:05:07Z