-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
PAL's context2.S causes build to fail on FreeBSD #4094
Comments
My change mostly just converted the file to the intel asm language syntax and added wrapper macros around the function name so that it generates proper name based on the target platform. |
The logs gots their formatting ruined when pasted to Github. It's not the DWORD it fails at, it failed at the first pipe when trying to bitwise OR things together. You can see this if you inspect the column-number too. You're still right about it complaining about number-formats though. I didn't think about that when submitting this! Checking out "make -n" yielded some (to me) unsatisfactory results, so I'll get a clean environment and clean build and retry. |
Are you sure "make -n" is the right command? After running a regular configure and build, this is the output I'm getting:
|
I've tried something more specific on my Ubuntu. In the src/pal/src folder, I've issued this: make -n -B arch/i386/context2.o And the output was: cd /home/janvorli/git/build && make -f src/pal/src/CMakeFiles/CoreClrPal.dir/build.make src/pal/src/CMakeFiles/CoreClrPal.dir/arch/i386/context2.S.o
/usr/bin/cmake -E cmake_progress_report /home/janvorli/git/build/CMakeFiles
/usr/bin/cmake -E cmake_echo_color --switch= --green "Building ASM object src/pal/src/CMakeFiles/CoreClrPal.dir/arch/i386/context2.S.o"
cd /home/janvorli/git/build/src/pal/src && /usr/bin/clang-3.5 -DBIT64=1 -DBUILDENV_CHECKED=1 -DCORECLR=1 -DDEBUG -DFEATURE_PAL=1 -DLP64COMPATIBLE=1 -DPIC=1 -DPLATFORM_UNIX=1 -DURTBLDENV_FRIENDLY=Checked -DWRITE_BARRIER_CHECK=1 -D_DBG -D_DEBUG -D_WIN64=1 -D__LINUX__=1 -g -I/home/janvorli/git/build/src/pal/src -I/home/janvorli/git/src/src/pal/src -I/home/janvorli/git/src/src/pal/inc -I/home/janvorli/git/src/src/pal/../inc -I/home/janvorli/git/src/src/pal/src/include -gdwarf-3 -fexceptions -fstack-protector-all -fno-builtin -fPIC -o CMakeFiles/CoreClrPal.dir/arch/i386/context2.S.o -c /home/janvorli/git/src/src/pal/src/arch/i386/context2.S |
For the last one, try whether either of these will help - both of these are changes towards the classic Intel syntax:
|
You can also use make VERBOSE=1, but it certainly does look like some other assembler is being used. |
@janvorli It may be worth noting that I don't try to build PAL directly, but rather try to build it indirectly by building entire coreclr. As far as I can tell src/pal/src doesn't have any makefile or CMakeFiles-folder. Thus the output from make -n -B ... doesn't seem consistent with the rest of the build as a whole:
There's a few obvious things to notice here:
Anyway, I would definitely agree with @kangaroo: It doesn't seem like the right tools are getting invoked, and I'd rather look into why that is happening, than you guys providing work-arounds at source-level. Using your VERBOSE=1 trick gives me the following nugget from a real build:
It looks like clang is getting used, but the system-default 3.4.1 installation. If I find a way to make this build correctly, what do you want me to do with that information? Create a PR for the readme with FreeBSD build-configuration instructions? Or something else? @janvorli : I'll do some more checking with the build commands and verify that this builds properly, given the proper input. @jkotas : I'll also check your suggestions, but if the wrong tools are getting invoked, I think it's better to fix the real problem instead of patching our way around it. |
Using clang3.5 fixes this issue. The error is not detecting it on FreeBSD. I will prepare a pull-request for this and that should be the end of this issue. |
clang-3.5 is required to build correctly, but is not detected on FreeBSD where it is aliased as clang35 and clang++35, not clang-3.5 and clang++-3.5. This closes https://github.com/dotnet/coreclr/issues/615
LGTM, it is great to see this mystery resolved. |
@janvorli I think you meant to LGTM on the PR (dotnet/coreclr#624) not the issue? |
clang-3.5 is required to build correctly, but is not detected on FreeBSD where it is aliased as clang35 and clang++35, not clang-3.5 and clang++-3.5. This closes https://github.com/dotnet/coreclr/issues/615
This file did not cause issues back in February when the first attempts to port coreclr to FreeBSD was made. Since then only a few commits have been made.
These commits seems to have introduced platform-specific use of macros, which may or may not be the cause of the errors observed.
Error from the build can be seen below:
The text was updated successfully, but these errors were encountered: