Link to home
Start Free TrialLog in
Avatar of jschultz0614
jschultz0614Flag for United States of America

asked on

Missing {Kernel Source}/Documentation/lguest on ver 3x under debian linux.

Hi...

I have been trying to compile version 3.0.4, 3.1 rc6 and 3.1 rc7 of the linux kernel obtained from github and have tried to compile several times with the same results each time.

I am missing a directory called {Kernel Source}/Documentation/lguest. I have re-downloaded the source several times as well and it appears that the folder is missing from the downloaded file(s). If this is missing from the source, I wonder what else is missing? (just a fore thought)

If I copy the missing folders from a known viable source to the new source and then compile, will this even work? or am I asking for more problems with adding possible instabilities with different kernel versions?

Thanks,
John
Avatar of Michael Eager
Michael Eager
Flag of United States of America image

It looks like a documentation file which didn't get checked in correctly.  Copying it from a different source tree is not likely to cause any problems.
Avatar of Duncan Roe
Do you have Documentation/virtual/lguest? Maybe you can just move it.
It was in linux-3.0 that I fetched from ftp.kernel.org some time before they went off the air, and that built fine.
Avatar of jschultz0614

ASKER

@eager:
I will definitely give that a try. My only concern is if that did not get checked in, what else did not make it :)

@duncan_roe:
I tried retreiving the source for 3 different 3.x sources from github and all three do not have the same files (so far).
@eager:
I'm definitely not familiar with GIT. I'm more familiar with subversion. Is there a way to compare the two source trees, say 2.6.39 and 3.1 rc7, and get the files from 2.6.39 that 3.1 rc7 is missing?
@duncan_roe:
My mistake... did not see the "virtual" let me check
@duncan_roe:
Yes, the Documentation/virtual/lguest folder exists and contains files
I don't know of a way to compare two different git repositories, but git has a large number of functions.  It's possible that you might find one if you go a search.  

I generally compare trees by doing "ls -R" on each tree, sorting the output, and diffing the result.  
OK...
I copied the lguest files from the virtual folder ---- Was not a good idea. Below is the result of the compile:

make[1]: Entering directory `/usr/160gb/kernel/torvalds-linux-4cf670b/Documentation/lguest'
cc -m32 -Wall -Wmissing-declarations -Wmissing-prototypes -O3 -U_FORTIFY_SOURCE    lguest.c   -o lguest
lguest.c:52:52: error: ../../../include/linux/lguest_launcher.h: No such file or directory
lguest.c:149: error: field ‘config’ has incomplete type
lguest.c: In function ‘get_feature_bits’:
lguest.c:249: error: invalid use of undefined type ‘struct lguest_device_desc’
lguest.c:250: error: invalid application of ‘sizeof’ to incomplete type ‘struct lguest_vqconfig’
lguest.c: In function ‘tell_kernel’:
lguest.c:559: error: ‘LHREQ_INITIALIZE’ undeclared (first use in this function)
lguest.c:559: error: (Each undeclared identifier is reported only once
lguest.c:559: error: for each function it appears in.)
lguest.c: In function ‘trigger_irq’:
lguest.c:627: error: ‘LHREQ_IRQ’ undeclared (first use in this function)
lguest.c:627: warning: initialization makes integer from pointer without a cast
lguest.c:627: error: request for member ‘irq’ in something not a structure or union
lguest.c:627: warning: initialization makes integer from pointer without a cast
lguest.c:641: error: request for member ‘irq’ in something not a structure or union
lguest.c:641: warning: format ‘%i’ expects type ‘int’, but argument 3 has type ‘long unsigned int *’
lguest.c: In function ‘reset_device’:
lguest.c:1008: error: request for member ‘num’ in something not a structure or union
lguest.c:1008: error: ‘LGUEST_VRING_ALIGN’ undeclared (first use in this function)
lguest.c:1008: warning: passing argument 1 of ‘vring_size’ makes integer from pointer without a cast
/usr/include/linux/virtio_ring.h:106: note: expected ‘unsigned int’ but argument is of type ‘long unsigned int *’
lguest.c:1008: warning: passing argument 2 of ‘vring_size’ makes integer from pointer without a cast
/usr/include/linux/virtio_ring.h:106: note: expected ‘long unsigned int’ but argument is of type ‘long unsigned int *’
lguest.c: In function ‘create_thread’:
lguest.c:1027: error: ‘LHREQ_EVENTFD’ undeclared (first use in this function)
lguest.c:1027: warning: initialization makes integer from pointer without a cast
lguest.c:1028: error: request for member ‘pfn’ in something not a structure or union
lguest.c:1028: error: invalid operands to binary * (have ‘long unsigned int *’ and ‘int’)
lguest.c:1028: warning: initialization makes integer from pointer without a cast
lguest.c: In function ‘update_device_status’:
lguest.c:1091: error: dereferencing pointer to incomplete type
lguest.c:1091: error: request for member ‘status’ in something not a structure or union
lguest.c:1093: error: dereferencing pointer to incomplete type
lguest.c:1093: error: request for member ‘status’ in something not a structure or union
lguest.c:1093: error: invalid operands to binary & (have ‘long unsigned int *’ and ‘int’)
lguest.c: In function ‘handle_output’:
lguest.c:1127: error: request for member ‘pfn’ in something not a structure or union
lguest.c:1127: error: invalid operands to binary * (have ‘long unsigned int *’ and ‘int’)
lguest.c:1127: warning: comparison between pointer and integer
lguest.c: In function ‘device_config’:
lguest.c:1161: error: invalid use of undefined type ‘struct lguest_device_desc’
lguest.c:1163: error: invalid application of ‘sizeof’ to incomplete type ‘struct lguest_vqconfig’
lguest.c: In function ‘new_dev_desc’:
lguest.c:1173: error: variable ‘d’ has initializer but incomplete type
lguest.c:1173: error: unknown field ‘type’ specified in initializer
lguest.c:1173: warning: excess elements in struct initializer
lguest.c:1173: warning: (near initialization for ‘d’)
lguest.c:1173: error: storage size of ‘d’ isn’t known
lguest.c:1179: error: dereferencing pointer to incomplete type
lguest.c:1179: error: request for member ‘config_len’ in something not a structure or union
lguest.c:1179: error: invalid operands to binary + (have ‘u8 *’ and ‘long unsigned int *’)
lguest.c:1184: error: invalid operands to binary + (have ‘void *’ and ‘long unsigned int *’)
lguest.c:1184: warning: comparison of distinct pointer types lacks a cast
lguest.c:1188: warning: passing argument 3 of ‘memcpy’ makes integer from pointer without a cast
/usr/include/string.h:43: note: expected ‘size_t’ but argument is of type ‘long unsigned int *’
lguest.c:1173: warning: unused variable ‘d’
lguest.c: In function ‘add_virtqueue’:
lguest.c:1203: error: ‘LGUEST_VRING_ALIGN’ undeclared (first use in this function)
lguest.c:1203: warning: passing argument 2 of ‘vring_size’ makes integer from pointer without a cast
/usr/include/linux/virtio_ring.h:106: note: expected ‘long unsigned int’ but argument is of type ‘long unsigned int *’
lguest.c:1220: error: request for member ‘num’ in something not a structure or union
lguest.c:1220: warning: statement with no effect
lguest.c:1221: error: request for member ‘irq’ in something not a structure or union
lguest.c:1221: warning: statement with no effect
lguest.c:1222: error: request for member ‘pfn’ in something not a structure or union
lguest.c:1222: warning: statement with no effect
lguest.c:1225: warning: passing argument 4 of ‘vring_init’ makes integer from pointer without a cast
/usr/include/linux/virtio_ring.h:96: note: expected ‘long unsigned int’ but argument is of type ‘long unsigned int *’
lguest.c:1233: error: dereferencing pointer to incomplete type
lguest.c:1233: error: request for member ‘config_len’ in something not a structure or union
lguest.c:1233: error: dereferencing pointer to incomplete type
lguest.c:1233: error: request for member ‘feature_len’ in something not a structure or union
lguest.c:1234: warning: passing argument 3 of ‘memcpy’ makes integer from pointer without a cast
/usr/include/string.h:43: note: expected ‘size_t’ but argument is of type ‘long unsigned int *’
lguest.c:1236: error: dereferencing pointer to incomplete type
lguest.c:1236: error: request for member ‘num_vq’ in something not a structure or union
lguest.c:1236: error: lvalue required as increment operand
lguest.c:1236: warning: statement with no effect
lguest.c: In function ‘add_feature’:
lguest.c:1257: error: dereferencing pointer to incomplete type
lguest.c:1257: error: request for member ‘feature_len’ in something not a structure or union
lguest.c:1257: warning: comparison between pointer and integer
lguest.c:1258: error: dereferencing pointer to incomplete type
lguest.c:1258: error: request for member ‘config_len’ in something not a structure or union
lguest.c:1259: error: dereferencing pointer to incomplete type
lguest.c:1259: error: request for member ‘feature_len’ in something not a structure or union
lguest.c:1259: warning: assignment makes integer from pointer without a cast
lguest.c: In function ‘set_config’:
lguest.c:1278: error: dereferencing pointer to incomplete type
lguest.c:1278: error: request for member ‘config_len’ in something not a structure or union
lguest.c:1278: warning: statement with no effect
lguest.c:1281: error: dereferencing pointer to incomplete type
lguest.c:1281: error: request for member ‘config_len’ in something not a structure or union
lguest.c:1281: warning: comparison between pointer and integer
make[1]: *** [lguest] Error 1
make[1]: Leaving directory `/usr/160gb/kernel/torvalds-linux-4cf670b/Documentation/lguest'
make: *** [debian/stamp/build/kernel] Error 2

Ok,.. so I am going to try and do a GIT difference (dont even know if this is even possible) to add the folders i am missing. AHHHH,... CRAP!!! I dont think that will actually work.

Any other Ideas?
ASKER CERTIFIED SOLUTION
Avatar of Duncan Roe
Duncan Roe
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
OMG... I should have noticed that... my apologies for posting that and DAMN you are a genius :). Cross your fingers, i'll give that a try.
OK,... I am definately not a C programmer (more of a C#, ASP.NET programmer), but will try and change the include line from:
include "../../include/linux/lguest_launcher.h"

Open in new window


to:
#include <linux/lguest_launcher.h>

Open in new window


and see if that works. If not, I will have to use the first one and statically set the location.

Thanks again.
Just change from ../../../include/linux/lguest_launcher.h to ../../include/linux/lguest_launcher.h (i.e. as per the diff, but backwards)
@dunca_roe:
Thanks for your help man.