Skip to main content

compiling snapapi module problems on RHEL4

Thread needs solution

Hi,
Getting the following error when compiling the snapapi module on a RHEL4 system:

Error! Bad return status for module build on kernel: 2.6.9-42.0.10.ELsmp (x86_64)

Using Backup and Recovery 10 Server for Linux 11345 i686

Content of make.log below:
DKMS make.log for snapapi26-0.7.47 for kernel 2.6.9-42.0.10.ELsmp (x86_64)
Thu Jan 7 09:43:23 GMT 2010
make: Entering directory `/usr/src/kernels/2.6.9-42.0.10.EL-smp-x86_64'
CC [M] /var/lib/dkms/snapapi26/0.7.47/build/snapapi26.o
/var/lib/dkms/snapapi26/0.7.47/build/snapapi26.c: In function `session_lockdev':
/var/lib/dkms/snapapi26/0.7.47/build/snapapi26.c:3152: warning: pointer type mismatch in conditional expression
/var/lib/dkms/snapapi26/0.7.47/build/snapapi26.c: In function `snapctl_unload':
/var/lib/dkms/snapapi26/0.7.47/build/snapapi26.c:3959: error: invalid application of `sizeof' to incomplete type `snapctl_register_blkdev'
/var/lib/dkms/snapapi26/0.7.47/build/snapapi26.c:3959: error: syntax error before ')' token
/var/lib/dkms/snapapi26/0.7.47/build/snapapi26.c:3960: error: syntax error before ')' token
/var/lib/dkms/snapapi26/0.7.47/build/snapapi26.c:3961: error: syntax error before ')' token
/var/lib/dkms/snapapi26/0.7.47/build/snapapi26.c:3962: error: syntax error before ')' token
/var/lib/dkms/snapapi26/0.7.47/build/snapapi26.c:3963: error: syntax error before ')' token
/var/lib/dkms/snapapi26/0.7.47/build/snapapi26.c:3964: error: syntax error before ')' token
/var/lib/dkms/snapapi26/0.7.47/build/snapapi26.c:3965: error: syntax error before ')' token
/var/lib/dkms/snapapi26/0.7.47/build/snapapi26.c: In function `snapapi_init':
/var/lib/dkms/snapapi26/0.7.47/build/snapapi26.c:4036: error: invalid application of `sizeof' to incomplete type `snapctl_register_blkdev'
/var/lib/dkms/snapapi26/0.7.47/build/snapapi26.c:4061: warning: label `err_thread' defined but not used
make[1]: *** [/var/lib/dkms/snapapi26/0.7.47/build/snapapi26.o] Error 1
make: *** [_module_/var/lib/dkms/snapapi26/0.7.47/build] Error 2
make: Leaving directory `/usr/src/kernels/2.6.9-42.0.10.EL-smp-x86_64'

Many Thanks, Adam

0 Users found this helpful

Hello Adam,

Thank you for posting your question, I will be happy to help. Please accept our apologies for the delay with the response.

We are aware of the issue you are experiencing, the fix will be available in the next released build. Meanwhile, please apply the below actions to resolve it:

- please save to your computer the file attached to my post. 

- rename the file to snapapi26.c

- put it into /usr/src/snapapi26-0.7.47/ directory

- run the following commands:

# dkms build -m snapapi26 -v 0.7.47

# dkms install -m snapapi26 -v 0.7.47

The issue should be resolved. 

Please let us know the results, we should be sure that the program runs flawlessly. If the provided information is not clear or if you have any other question do not hesitate to post them and we will be glad to answer.

Thank you.

Attachment Size
18101-87124.txt 97.77 KB

Oleg,

I am running Oracle Enterprise Linux 5 (an RH derivative,) and having this issue.

My kernel:
Linux m042085 2.6.18-164.15.1.0.1.el5 #1 SMP Wed Mar 17 01:10:06 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

My Snapapi:
[root@m042085 snapapi26-0.7.45]# pwd
/usr/src/snapapi26-0.7.45
[root@m042085 snapapi26-0.7.45]# dkms status
snapapi26, 0.7.45: added

My error (during TrueImage install, or when attempting to compile snapapi directly using your fixed file):
[root@m042085 snapapi26-0.7.45]# dkms install -m snapapi26 -v 0.7.45

Error! Could not locate snapapi26.ko for module snapapi26 in the DKMS tree.
You must run a dkms build for kernel 2.6.18-164.15.1.0.1.el5 (x86_64) first.

The build was successful using either the source you've provided or what was delivered with the TrueImage package (build 8398.)

Do I need to upgrade? Is there a fix you can provide?

Thanks, George

Hello George,

Thank you for your post. I will definitely assist you with this.

Please check the following article for a solution to this issue. If you run into any issues, please kindly get back to us.

Let me know if you have any other questions.

Thank you.

Anton,

Thanks for pointing me to the right source version, but I am still unable to compile the snapapi.

[root@m042085 2.6.18-164.15.1.0.1.el5-x86_64]# dkms build -m snapapi26 -v 0.7.45 --config /usr/src/kernels/2.6.18-164.15.1.0.1.el5-x86_64/include/linux/config.h --arch x86_64 --kernelsourcedir /usr/src/kernels/2.6.18-164.15.1.0.1.el5-x86_64

Error! DKMS tree does not contain: snapapi26-0.7.45
Build cannot continue without the proper tree.
[root@m042085 2.6.18-164.15.1.0.1.el5-x86_64]# dkms build -m snapapi26 -v 0.7.45-1 --config /usr/src/kernels/2.6.18-164.15.1.0.1.el5-x86_64/include/linux/config.h --arch x86_64 --kernelsourcedir /usr/src/kernels/2.6.18-164.15.1.0.1.el5-x86_64

Error! DKMS tree does not contain: snapapi26-0.7.45-1
Build cannot continue without the proper tree.

[root@m042085 u]# rpm -qa | grep snapapi
snapapi26_modules-0.7.45-1

Am I doing something wrong?

Thanks, George

Hello George,

Thank you for replying.

Please try installing the following way and let me know if you run into any issues:

1. rpm -Uvh snapapi*(that you have downloaded)
2. dkms ldtarball --archive /usr/lib/Acronis/kernel_modules/<snapapi name>
3. dkms build -m snapapi26 -v 0.7.45
4. dkms install -m snapapi26 -v 0.7.45

Please let me know if you have any other questions.

Thank you.

Anton,

I think we are making progress, but not quite there yet.

rpm -Uvh did not work, however rpm --erase followed by rpm -ivh did

dkms ldtarball, build, and install, all reported success.

However when I tried to install the TrueImage Echo Server (TrueImageServerEcho.8398_s_en.i686) it is still reporting that it cannot find an installed snapapi module and when I allow it to compile it fails as before.
Then too, rpm -qa | grep snapapi reports that the installation process has upgraded the snapapi module from what you gave me snapapi26_modules-0.7.45-1_fmode_t.noarch.rpm to snapapi26_modules-0.7.45-2

I am not stuck on build 8398 of the Echo server if there is a better one for my environment..

how can we resolve this?

Thanks, George

Hello again George,

There is no issue with the build. Please try the same steps that I mentioned in my previous post, since you are trying to use the latest build and I am sure this issue will be resolved.

Let me know if you need additional assistance please.

Thank you.

Anton, I apologize for the confusion. I do not believe this has anything to do with the Echo Server Build, there is simply an issue with the installation. I am attaching two files to document what I am seeing..

1) acronis_install.log - this is a text file that records the installation of snapapi26_modules-0.7.45-1_fmode_t.noarch.rpm (the file you asked me to download and install,) and also the error logs generated by the TrueImageServerEcho.8398_s_en.i686.

2) Acronis_error.doc - this is somewhat redundant since it shows the same error as the log above, but it includes two screen images that document the GUI installation process.

At this time I am still not able to install the Echo Server, so I am asking for your help to resolve this.

Thank you, George

Attachment Size
31523-89431.doc 47 KB

George,

Please try installing the downloaded snapapi package - snapapi26_modules-0.7.45-1_fmode_t.noarch.rpm.

If it still fails, please collect a Linux System Report and submit a support request, you can also mention this thread for the steps taken to resolve this issue.

Thank you.