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

Doesn't compile on Ubuntu 16.04 #6

Open
rbabchis opened this issue May 11, 2016 · 1 comment
Open

Doesn't compile on Ubuntu 16.04 #6

rbabchis opened this issue May 11, 2016 · 1 comment

Comments

@rbabchis
Copy link

My skills are limited, but I got this far. I'd love to try out kgpu some day.

Cloned the repo and ran make:

mkdir -p build
make -C kgpu  kv= BUILD_DIR=`pwd`/build
make[1]: Entering directory '/home/rbabchis/kgpu/kgpu/kgpu'
make -C /lib/modules/4.4.0-22-generic/build M=`pwd` modules
make[2]: Entering directory '/usr/src/linux-headers-4.4.0-22-generic'
  CC [M]  /home/rbabchis/kgpu/kgpu/kgpu/main.o
/home/rbabchis/kgpu/kgpu/kgpu/main.c: In function ‘kgpu_mmap’:
/home/rbabchis/kgpu/kgpu/kgpu/main.c:923:22: error: ‘VM_RESERVED’ undeclared (first use in this function)
     vma->vm_flags |= VM_RESERVED;
                      ^
/home/rbabchis/kgpu/kgpu/kgpu/main.c:923:22: note: each undeclared identifier is reported only once for each function it appears in
scripts/Makefile.build:258: recipe for target '/home/rbabchis/kgpu/kgpu/kgpu/main.o' failed
make[3]: *** [/home/rbabchis/kgpu/kgpu/kgpu/main.o] Error 1
Makefile:1396: recipe for target '_module_/home/rbabchis/kgpu/kgpu/kgpu' failed
make[2]: *** [_module_/home/rbabchis/kgpu/kgpu/kgpu] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-4.4.0-22-generic'
Makefile:8: recipe for target 'kgpu' failed
make[1]: *** [kgpu] Error 2
make[1]: Leaving directory '/home/rbabchis/kgpu/kgpu/kgpu'
Makefile:9: recipe for target 'kgpu' failed
make: *** [kgpu] Error 2

Tried to fix the error, then get this after make:

mkdir -p build
make -C kgpu  kv= BUILD_DIR=`pwd`/build
make[1]: Entering directory '/home/rbabchis/kgpu/kgpu'
make -C /lib/modules/4.4.0-22-generic/build M=`pwd` modules
make[2]: Entering directory '/usr/src/linux-headers-4.4.0-22-generic'
  CC [M]  /home/rbabchis/kgpu/kgpu/main.o
  CC [M]  /home/rbabchis/kgpu/kgpu/kgpu_kutils.o
  CC [M]  /home/rbabchis/kgpu/kgpu/kgpu_log.o
  LD [M]  /home/rbabchis/kgpu/kgpu/kgpu.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/rbabchis/kgpu/kgpu/kgpu.mod.o
  LD [M]  /home/rbabchis/kgpu/kgpu/kgpu.ko
make[2]: Leaving directory '/usr/src/linux-headers-4.4.0-22-generic'
cp kgpu.ko /home/rbabchis/kgpu/build/  
gcc -O2 -D__KGPU__ -c kgpu_log.c -o kgpu_log_user.o
ar -rcs kgpu_log.a kgpu_log_user.o
cp kgpu_log.a /home/rbabchis/kgpu/build/ 
gcc -O2 -D__KGPU__ -c helper.c
gcc -O2 -D__KGPU__ -c service.c
nvcc -O2 -D__KGPU__ -D_FORCE_INLINES -c -arch=sm_20 gpuops.cu
nvcc -link -D__KGPU__ -O2 -arch=sm_20 service.o helper.o kgpu_log_user.o gpuops.o -o helper -ldl
cp helper /home/rbabchis/kgpu/build/ 
make[1]: Leaving directory '/home/rbabchis/kgpu/kgpu'
make -C services  kv= BUILD_DIR=`pwd`/build
make[1]: Entering directory '/home/rbabchis/kgpu/services'
make -C gaes  kv= BUILD_DIR=/home/rbabchis/kgpu/build
make[2]: Entering directory '/home/rbabchis/kgpu/services/gaes'
make -C callaes  BUILD_DIR=/home/rbabchis/kgpu/build
make[3]: Entering directory '/home/rbabchis/kgpu/services/gaes/callaes'
make -C /lib/modules/4.4.0-22-generic/build M=/home/rbabchis/kgpu/services/gaes/callaes modules
make[4]: Entering directory '/usr/src/linux-headers-4.4.0-22-generic'
  CC [M]  /home/rbabchis/kgpu/services/gaes/callaes/callgaes.o                                                                 
  Building modules, stage 2.                                                                                                   
  MODPOST 1 modules                                                                                                            
  CC      /home/rbabchis/kgpu/services/gaes/callaes/callgaes.mod.o                                                             
  LD [M]  /home/rbabchis/kgpu/services/gaes/callaes/callgaes.ko                                                                
make[4]: Leaving directory '/usr/src/linux-headers-4.4.0-22-generic'                                                           
cp callgaes.ko /home/rbabchis/kgpu/build/                                                                                      
make[3]: Leaving directory '/home/rbabchis/kgpu/services/gaes/callaes'
make -C ecryptfs  BUILD_DIR=/home/rbabchis/kgpu/build
make[3]: Entering directory '/home/rbabchis/kgpu/services/gaes/ecryptfs'
make -C /lib/modules/4.4.0-22-generic/build M=/home/rbabchis/kgpu/services/gaes/ecryptfs modules
make[4]: Entering directory '/usr/src/linux-headers-4.4.0-22-generic'
  CC [M]  /home/rbabchis/kgpu/services/gaes/ecryptfs/dentry.o
/home/rbabchis/kgpu/services/gaes/ecryptfs/dentry.c: In function ‘ecryptfs_d_revalidate’:
/home/rbabchis/kgpu/services/gaes/ecryptfs/dentry.c:59:14: error: dereferencing pointer to incomplete type ‘struct nameidata’
  if (nd && nd->flags & LOOKUP_RCU)
              ^
/home/rbabchis/kgpu/services/gaes/ecryptfs/dentry.c:72:54: warning: passing argument 2 of ‘lower_dentry->d_op->d_revalidate’ makes integer from pointer without a cast [-Wint-conversion]
  rc = lower_dentry->d_op->d_revalidate(lower_dentry, nd);
                                                      ^
/home/rbabchis/kgpu/services/gaes/ecryptfs/dentry.c:72:54: note: expected ‘unsigned int’ but argument is of type ‘struct nameidata *’
/home/rbabchis/kgpu/services/gaes/ecryptfs/dentry.c: At top level:
/home/rbabchis/kgpu/services/gaes/ecryptfs/dentry.c:109:18: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
  .d_revalidate = ecryptfs_d_revalidate,
                  ^
/home/rbabchis/kgpu/services/gaes/ecryptfs/dentry.c:109:18: note: (near initialization for ‘ecryptfs_dops.d_revalidate’)
scripts/Makefile.build:258: recipe for target '/home/rbabchis/kgpu/services/gaes/ecryptfs/dentry.o' failed
make[5]: *** [/home/rbabchis/kgpu/services/gaes/ecryptfs/dentry.o] Error 1
Makefile:1396: recipe for target '_module_/home/rbabchis/kgpu/services/gaes/ecryptfs' failed
make[4]: *** [_module_/home/rbabchis/kgpu/services/gaes/ecryptfs] Error 2
make[4]: Leaving directory '/usr/src/linux-headers-4.4.0-22-generic'
Makefile:10: recipe for target 'all' failed
make[3]: *** [all] Error 2
make[3]: Leaving directory '/home/rbabchis/kgpu/services/gaes/ecryptfs'
Makefile:8: recipe for target 'ecryptfs' failed
make[2]: *** [ecryptfs] Error 2
make[2]: Leaving directory '/home/rbabchis/kgpu/services/gaes'
Makefile:8: recipe for target 'gaes' failed
make[1]: *** [gaes] Error 2
make[1]: Leaving directory '/home/rbabchis/kgpu/services'
Makefile:9: recipe for target 'services' failed
make: *** [services] Error 2
@jamesbolden
Copy link

I'm having the same issue. I assume it's incompatibility with at least 4.4+. Are there any plans to update?

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