Skip to content
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

build.rs fails to detect xen headers #111

Open
najamelan opened this issue Jan 3, 2018 · 3 comments
Open

build.rs fails to detect xen headers #111

najamelan opened this issue Jan 3, 2018 · 3 comments

Comments

@najamelan
Copy link
Contributor

I try to run build.rs xen, but the detection check for the headers fails:

user@qubes-dev ~/c/u/rumprun> printf '#include <stdint.h>\n#include <xen.h>\n' | cc   -I/usr/include/xen  -x c - -c -o /dev/null
In file included from /usr/lib/gcc/x86_64-redhat-linux/7/include/stdint.h:9:0,
                 from <stdin>:1:
/usr/include/stdint.h:310:17: error: missing binary operator before token "("
 #if __GLIBC_USE (IEC_60559_BFP_EXT)
                 ^

This will compile just fine:

printf '#include <stdint.h>\n#include <xen/xen.h>\n' | cc  -x c - -c -o /dev/null

I don't really manage to figure out why adding the -I flag breaks things...?

I found this: https://forums.xilinx.com/t5/Vivado-High-Level-Synthesis-HLS/Testbench-error-with-gcc/td-p/756773
The xen include directory does have a features.h, but don't exactly grasp how they interfere.


Fedora 26
Installed Packages
Name         : gcc                                  - Version      : 7.2.1 - Release      : 2.fc26
Name         : xen-devel - Epoch: 2001 - Version      : 4.8.2 - Release      : 11.fc26

user@qubes-dev ~/c/u/rumprun> gcc -xc -E -v -
Using built-in specs.
COLLECT_GCC=gcc
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --enable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 7.2.1 20170915 (Red Hat 7.2.1-2) (GCC) 
COLLECT_GCC_OPTIONS='-E' '-v' '-mtune=generic' '-march=x86-64'
 /usr/libexec/gcc/x86_64-redhat-linux/7/cc1 -E -quiet -v - -mtune=generic -march=x86-64
ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/7/include-fixed"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/7/../../../../x86_64-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/x86_64-redhat-linux/7/include
 /usr/local/include
 /usr/include
End of search list.
@najamelan
Copy link
Contributor Author

hmm, and once I cheat the script to get the right header location for Xen, I get more compile errors:

/home/user/code/unikernels/rumprun/src-netbsd/sys/rump/kern/lib/libsys_linux/../../../../compat/linux/common/linux_hdio.c:124:6: 
error: this statement may fall through [-Werror=implicit-fallthrough=]
   if (error == 0)
      ^
/home/user/code/unikernels/rumprun/src-netbsd/sys/rump/kern/lib/libsys_linux/../../../../compat/linux/common/linux_hdio.c:126:2: note: here
  case LINUX_HDIO_GETGEO_BIG_RAW:
  ^~~~
--- dependall-/home/user/code/unikernels/rumprun/src-netbsd/sys/rump ---
--- popcount64.d ---

@najamelan
Copy link
Contributor Author

Actually the implicit-fallthrough seems to be a GCC7 issue. I'll try to fix it.

@najamelan
Copy link
Contributor Author

Filed an issue at rumpkernel/src-netbsd: rumpkernel/src-netbsd#4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant