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 issue in tests #22

Closed
bhundven opened this issue Sep 12, 2014 · 7 comments
Closed

build issue in tests #22

bhundven opened this issue Sep 12, 2014 · 7 comments

Comments

@bhundven
Copy link

bryan@fuzzy:~/kdbus$ make
make -C /lib/modules/3.17.0-rc4+/build M=/home/bryan/kdbus                                                                   
make[1]: Entering directory '/home/bryan/build/linux'
  LD      /home/bryan/kdbus/built-in.o
  CC [M]  /home/bryan/kdbus/bus.o
  CC [M]  /home/bryan/kdbus/connection.o
  CC [M]  /home/bryan/kdbus/endpoint.o
  CC [M]  /home/bryan/kdbus/handle.o
  CC [M]  /home/bryan/kdbus/main.o
  CC [M]  /home/bryan/kdbus/match.o
  CC [M]  /home/bryan/kdbus/message.o
  CC [M]  /home/bryan/kdbus/metadata.o
  CC [M]  /home/bryan/kdbus/names.o
  CC [M]  /home/bryan/kdbus/notify.o
  CC [M]  /home/bryan/kdbus/domain.o
  CC [M]  /home/bryan/kdbus/policy.o
  CC [M]  /home/bryan/kdbus/pool.o
  CC [M]  /home/bryan/kdbus/queue.o
  CC [M]  /home/bryan/kdbus/util.o
  LD [M]  /home/bryan/kdbus/kdbus.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/bryan/kdbus/kdbus.mod.o
  LD [M]  /home/bryan/kdbus/kdbus.ko
make[1]: Leaving directory '/home/bryan/build/linux'
make -C test KERNELDIR=/home/bryan/build/linux KBUILD_MODNAME=kdbus
make[1]: Entering directory '/home/bryan/kdbus/test'
  TARGET_CC kdbus-enum.o
In file included from ../kdbus.h:23:0,
                 from kdbus-util.h:13,
                 from kdbus-enum.c:20:
/home/bryan/build/linux/include/uapi/linux/types.h:9:2: warning: #warning "Attempt to use kernel headers from user space, see http://kernelnewbies.org/KernelHeaders" [-Wcpp]
 #warning "Attempt to use kernel headers from user space, see http://kernelnewbies.org/KernelHeaders"
  ^
In file included from /home/bryan/build/linux/include/uapi/linux/posix_types.h:4:0,
                 from /home/bryan/build/linux/include/uapi/linux/types.h:13,
                 from ../kdbus.h:23,
                 from kdbus-util.h:13,
                 from kdbus-enum.c:20:
/home/bryan/build/linux/include/uapi/linux/stddef.h:1:28: fatal error: linux/compiler.h: No such file or directory
 #include <linux/compiler.h>
                            ^
compilation terminated.
Makefile:32: recipe for target 'kdbus-enum.o' failed
make[1]: *** [kdbus-enum.o] Error 1
make[1]: Leaving directory '/home/bryan/kdbus/test'
Makefile:27: recipe for target 'test' failed
make: *** [test] Error 2

With linus's tree at: 5874cfed0b04f53146f70a519a2371cea5f39178
And kdbus at: fa32cbd

@gregkh
Copy link
Owner

gregkh commented Sep 12, 2014

Have you built the kernel at /home/bryan/build/linux/ yet?
The tests have "issues" if you don't set up your kernel tree properly, best bet, install 3.17-rc on your machine and run the tests that way, you need to in order to be able to test the code at the moment anyway :)

@bhundven
Copy link
Author

Yes, the 3.17-rc kernel was built and running when I did the kdbus build. I did the build with debian make-kpkg.

@gregkh
Copy link
Owner

gregkh commented Sep 12, 2014

I have no idea what the debian package does, but it looks like the kernel source headers aren't included properly somehow, sorry, you are on your own here.

@gregkh gregkh closed this as completed Sep 12, 2014
@bhundven
Copy link
Author

Ah, I see. I think I found a bug in kernel-package. Thanks!

@bhundven
Copy link
Author

Actually, I spoke too soon. I get the same problems with fresh clones building by hand:

cd ~/build
git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
cd linux
cp ../current.config .config
make oldconfig
make -j4 && sudo make modules_install && sudo make install
reboot

make install on debian will automatically build the initramfs and update the grub.cfg so next boot will be my new kernel.

cd ~/build
git clone https://github.com/gregkh/kdbus
make

and I am back to the same error in the OP.
So, maybe I need to bisect upstream to see where it broke?

@gregkh
Copy link
Owner

gregkh commented Sep 12, 2014

try 'make headers_install' and see if that helps. There was an email thread about these issues a few weeks ago on the systemd mailing list, I thought we figured out all the odd combinations, but I guess not,

@gregkh gregkh reopened this Sep 12, 2014
@bhundven
Copy link
Author

Ah-ha! Ok, so for both builds I've done, neither of them 'make headers_install' to the build directory.
The first build (with make-kpkg) makes a linux-headers package, and does symlink to the location of the installed headers in /lib/modules/<version>/{build,source}, but for some reason kdbus was looking at my actual build directory.

So running headers_install (without setting INSTALL_HDR_PATH) fixed the second build done by hand.
It does seem that the issue is either with the way that the upstream kernel installs headers (when INSTALL_HDR_PATH is set - external to the build directory), or how kernel-package symlinks to the installed header path.
Neither of these have to do with kdbus, so closing this here.

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

2 participants