Ticket #839 (new defect)

Opened 2 months ago

Last modified 2 hours ago

Error on bulding ndas-modules

Reported by: luis.san.pt@gmail.com Assigned to: hootch
Priority: high Milestone: 1.1
Component: xplat Version: 1.1-XX
Severity: blocker Keywords: ubuntu
Cc: Kernel Version (Result of "uname -r"): 2.6.27-7-generic
Linux Distribution: Ubuntu cpu/chip: i386
Linux Dist Version: 8.10

Description

Hi,

I Build NDAS packages correctly. Install the ndas-modules-src_1.1-24_all.deb. run sudo m-a prepare run sudo m-a auto-install ndas and given this error "Build of the package ndas-modules-src failed! How do youwish to proceed"

Log (Last Lines):

│ -Iinclude -I/usr/src/linux-headers-2.6.27-7-generic/arch/x86/include ↑ │ -include include/linux/autoconf.h -Iubuntu/include -Wall -Wundef ▒ │ -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common ▒ │ -Werror-implicit-function-declaration -O2 -m32 -msoft-float -mregparm=3 ▒ │ -freg-struct-return -mpreferred-stack-boundary=2 -march=i586 ▒ │ -mtune=generic -ffreestanding -pipe -Wno-sign-compare ▒ │ -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow ▒ │ -Iinclude/asm-x86/mach-default -fno-stack-protector ▒ │ -fno-omit-frame-pointer -fno-optimize-sibling-calls -pg ▒ │ -Wdeclaration-after-statement -Wno-pointer-sign -DMODULE -DLINUX ▒ │ -I/usr/src/modules/ndas/inc -D_X86 -DMODULE -D"KBUILD_STR(s)=#s" ▒ │ -D"KBUILD_BASENAME=KBUILD_STR(block26)" ▮ │ -D"KBUILD_MODNAME=KBUILD_STR(ndas_block)" -c -o ▒ │ /usr/src/modules/ndas/block/.tmp_block26.o ▒ │ /usr/src/modules/ndas/block/block26.c │ In file included from /usr/src/modules/ndas/block/block26.c:44: ↑ │ include/linux/ide.h:125:1: warning: "PARTN_BITS" redefined ▒ │ In file included from /usr/src/modules/ndas/block/block26.c:40: ▒ │ /usr/src/modules/ndas/block/block.h:67:1: warning: this is the location ▒ │ of the previous definition ▒ │ /usr/src/modules/ndas/block/block26.c:483: error: expected ‘)’ before ▒ │ ‘*’ token ▒ │ make[4]: *** /usr/src/modules/ndas/block/block26.o Error 1 ▒ │ make[3]: *** [_module_/usr/src/modules/ndas] Error 2 ▒ │ make[3]: Leaving directory `/usr/src/linux-headers-2.6.27-7-generic' ▒ │ make[2]: *** /usr/src/modules/ndas/ndas_sal.ko Error 2 ▒ │ make[2]: Leaving directory `/usr/src/modules/ndas' ▒ │ make[1]: *** [binary-modules] Error 2 ▒ │ make[1]: Leaving directory `/usr/src/modules/ndas' ▮ │ make: *** [kdist_build] Error 2

Thanks

Attachments

Linux2.6.27.patch (5.2 kB) - added by Illusion on 11/25/08 09:53:19.
Patch to fix NDAS source for Linux 2.6.27
ndas_1.1-24.tar.gz (230.6 kB) - added by anonymous on 12/26/08 14:21:23.

Change History

11/25/08 09:53:19 changed by Illusion

  • attachment Linux2.6.27.patch added.

Patch to fix NDAS source for Linux 2.6.27

11/25/08 09:54:17 changed by Illusion

I have created a patch so the NDAS source code, ndas_1.1-24.tar.gz, will compile on Linux 2.6.27-7-generic (using Ubuntu 8.10). To use this patch, put it in your NDAS source directory (the location where you unpacked this tar.gz file; which should also have the "INSTALL" & "README" files), and run:

patch -p1 <Linux2.6.27.patch

patch is in the patch package.

Then you should be able to "make" and "sudo make install". This works on my network and brings up my previously working NDAS drives using my old registration information.

There is one outstanding warning, which I did not have time to resolve: WARNING: could not find /Projects/ndas-1.1-24/.ndas.o.cmd for /Projects/ndas-1.1-24/ndas.o but the code works for me regardless.

***IMPORTANT NOTE*** A recent change to the NDAS software broke access to my "Net" disk. The kernel module ndas-core needs to know which network interface to use for access to the drive. This can be fixed with an entry in /etc/modprobe.d/options:

options ndas-core ndas_dev='''wlan0'''

BE SURE TO REPLACE THE wlan0 with the network interface your computer will use to access your drive!

Good luck! Doug

11/26/08 13:36:30 changed by luis.san.pt@gmail.com

It's work fine!

Thanks

(follow-up: ↓ 5 ) 11/29/08 07:46:35 changed by anonymous

Please make this patch visible on main page!

11/29/08 13:52:58 changed by Illusion

I just noticed that my comment about the /etc/modprobe.d/options entry is incorrect. I tried to bold the wlan0, which apparently works in the "Preview", but not the final submission (I think a {bold} nested inside a {code} block fails). Ignore all the quotes on that "options" entry. It should be:

options ndas-core ndas_dev=wlan0

and replace the wlan0 with your network interface.

Doug

(in reply to: ↑ 3 ) 11/29/08 14:03:08 changed by Illusion

Replying to anonymous:

Please make this patch visible on main page!

Good idea! I put a link to this ticket in the News section of the WikiStart page.

12/01/08 12:53:09 changed by guaguo

I've got a problem:

xxx@ubuntu1:~/ndas-1.1-24$ patch -p1 <Linux2.6.27.patch patch: **** Only garbage was found in the patch input.

Any idea, thanks (I use 8.10 new install)

12/01/08 14:10:38 changed by Illusion

Have a look at the text in your "Linux2.6.27.patch" file, perhaps there was an error downloading it. It should be "readable" text (i.e.: no binary characters).

The MD5 is:
e5c300f5e79660f9492a96e02dbdf548 Linux2.6.27.patch

The first patch block is (1st lines in file):

diff --git a/block/block.h b/block/block.h
index b07e797..cb5a360 100644
--- a/block/block.h
+++ b/block/block.h
@@ -61,13 +61,14 @@
 #define dbgl_blk(l,fmt...) do {} while(0)
 #endif
 
-
 #if LINUX_VERSION_25_ABOVE // 2.5.x or above
 #define DRIVER_MASK        0xf0
+#ifndef PARTN_BITS 	// 2.6.27 defines this already
 #define PARTN_BITS        4
+#endif
 #else
 #define DRIVER_MASK        0xf8
-#define PARTN_BITS        3    
+#define PARTN_BITS        3
 #endif
 #define NR_PARTITION    (1U << PARTN_BITS)    
 #define PARTN_MASK        (NR_PARTITION -1)

Let us know if you find the problem, or need more help. Doug

12/02/08 03:23:13 changed by guaguo

Well you were right the patch was corrupt (was in html format)

Now everything is ok and I've got my netdisk working.

Thanks

12/02/08 09:59:34 changed by Illusion

Good to hear! Thanks for reporting back... --Doug

12/04/08 12:24:20 changed by anonymous

Hello,

I have the same problem, see my ticket-827.

So, when the patch was corrupt (in html format) where can I download the right patch???

The link linux2.6.27.patch always shows a html file after download.

12/04/08 22:04:55 changed by Illusion

Can you describe the process you use to download the patch?

If I right click on the link and "Save as...", then it is fine. If I click on it and save the page that loads, then it is HTML.

12/05/08 07:33:39 changed by guaguo

12/15/08 16:15:35 changed by resanders@conicstar.net

Hello.

Do I install the patch before the command dpkg-buildpackage -rfakeroot? The error I'm getting before running that command is: patch: **** strip count 1 is not a number

Thanks

12/16/08 18:01:37 changed by Illusion

Hi,

The patch I provided modifies the source code. So it must be applied before the source is compiled into usable software. You don't need dpkg-buildpackage to install NDAS on your system. Try my directions posted at the top (25 Nov 2008) and let us know if they work.

If you want help understanding why you received that error message, you'll need to let us know more about what you did.

Good luck

12/19/08 10:25:59 changed by resanders@conicstar.net

Thank you. Yes, the directions worked. I did have some trial-and-error attempts trying to use the old guidelines before discovering where I needed to be to register the disk.

Thank you again.

12/26/08 14:21:23 changed by anonymous

  • attachment ndas_1.1-24.tar.gz added.

12/31/08 04:40:02 changed by sudo

Hi,

thanks for your help so far.

I've downloaded the src code from: http://code.ximeta.com/dev/current/linux md5sum: ccedb4db57f302674ebe93bf148d7188 ndas-1.1-24.tar.gz

and the patch: http://code.ximeta.com/trac-ndas/attachment/ticket/839/Linux2.6.27.patch?format=raw md5sum: e5c300f5e79660f9492a96e02dbdf548 Linux2.6.27.patch

my kernel is 2.6.27-9-generic

the problem: patch -p1 <Linux2.6.27.patch replies: patch: **** strip count l is not a number

has anyone an idea how to fix that problem? thank you very much!

12/31/08 06:10:40 changed by resanders@conicstar.net

I believe the problem lies with the character following -p being the number one rather than the letter "l." I tried both ways and got the same error when I used -pl (letter "l"). When I used -p1 (number one), the command indicated that I had already applied the patch since that was the case. My kernel is the same as yours.

Roger

12/31/08 13:10:14 changed by Tony

Ouhh Yeah!! Thank you very much men.

01/01/09 04:58:45 changed by anonymous

Works fine on 2.6.27-9 unfortunately I've reinstalled latest mandriva cooker and now kernel is 2.6.28-desktop-0.rc8.1mnb and it fails to compile (many errors)

01/01/09 05:11:51 changed by anonymous

Perhaps Illusion will be able to create a patch for the new kernel. I know I'm hoping so. In the meantime, can you not access your drive using a USB connection? I know this is not satisfactory, but it does work if your device comes with that capability.

01/03/09 03:34:00 changed by anonymous

unfortunately not as it is located in the house next to mine (disaster recovery disk). On thing that is sure, is that I'll never ever buy any new ximeta products and proprietary products to avoid so poor support. :-(

01/03/09 19:03:57 changed by Illusion

Since I'm using Ubuntu 8.10, I don't have access to the 2.6.28-desktop-0.rc8.1mnb kernel that you are using for Mandriva, but I'm downloading the 2.6.28 kernel now and I'll have a look at whether I can "hand-patch" that source for NDAS. If I think I can, then I'll post it and you can give it a try and let us know if it works (the Mandriva patches may interfere).

Happy New Year, Doug

01/04/09 10:17:40 changed by anonymous

I'm now using 2.6.28-desktop-2nmb which is a 2.6.28 final with few add-ons and extra drivers. It should behave the same as a vanila 2.6.28.0. I'm not a developper, but I'll be very pleased to test and report.

Best regards.

Olivier.

01/04/09 18:04:46 changed by Illusion

Hi Olivier,

Can you send me the error output from your make attempt? I compiled 2.6.28 and began compiling my patched version of ndas-1.1-24 against it and received the following first error. I want to know if it is consistent with what you are getting, so I can feel like I'm on the right track...

ndas-1.1-24/block/block26.c:54: warning: initialization from incompatible pointer type
ndas-1.1-24/block/block26.c:55: warning: initialization from incompatible pointer type
ndas-1.1-24/block/block26.c:56: warning: initialization from incompatible pointer type
ndas-1.1-24/block/block26.c: In function ‘nbio_alloc’:
ndas-1.1-24/block/block26.c:156: error: ‘struct request’ has no member named ‘nr_hw_segments’
ndas-1.1-24/block/block26.c: In function ‘nblk_request_proc’:
ndas-1.1-24/block/block26.c:438: error: ‘REQ_FAILFAST’ undeclared (first use in this function)
ndas-1.1-24/block/block26.c:438: error: (Each undeclared identifier is reported only once
ndas-1.1-24/block/block26.c:438: error: for each function it appears in.)

I'm not planning to apply the Ubuntu patches to this kernel, so I won't be running it or the resulting NDAS module (I don't have time to research that development path right now), but if I'm on the right track, you should be successful at patching, compiling & running the result.

Regards, Doug

01/05/09 09:38:35 changed by anonymous

Hi,

Here is the result on ndas build (1.1-24 + above patch for kernel 2.6.27)

$ rpmbuild -bb ndas.spec Exécution_de(%prep): /bin/sh -e /var/tmp/rpm-tmp.N0ILet + umask 022 + cd /home/lahaye/rpmbuild/BUILD + ' 1 -eq 1 ?' + ' 1 -eq 1 ?' + ' 1 -eq 1 ?' + cd /home/lahaye/rpmbuild/BUILD + rm -rf ndas-1.1-24 + /usr/bin/gzip -dc /home/lahaye/rpmbuild/SOURCES/ndas-1.1-24.tar.gz + /bin/tar -xf - + STATUS=0 + ' 0 -ne 0 ?' + cd ndas-1.1-24 + exit 0 Exécution_de(%build): /bin/sh -e /var/tmp/rpm-tmp.A3AfX4 + umask 022 + cd /home/lahaye/rpmbuild/BUILD + cd ndas-1.1-24 + ' 1 -eq 1 ?' + ' 1 -eq 1 ?' + export 'NDAS_EXTRA_CFLAGS= -DNDAS_MAX_SLOT=16' + NDAS_EXTRA_CFLAGS=' -DNDAS_MAX_SLOT=16' + make ndas-kernel ndas-admin Invoking make againt the kernel at /lib/modules/2.6.28-desktop-2mnb/build make -C /lib/modules/2.6.28-desktop-2mnb/build \

SUBDIRS=/home/lahaye/rpmbuild/BUILD/ndas-1.1-24 \ KBUILD_VERBOSE=1 \ ndas_root=/home/lahaye/rpmbuild/BUILD/ndas-1.1-24 \ modules

make[1]: entrant dans le répertoire « /usr/src/linux-2.6.28-desktop-2mnb »

test -e include/linux/autoconf.h -a -e include/config/auto.conf ( \

echo; \ echo " ERROR: Kernel configuration is invalid."; \ echo " include/linux/autoconf.h or include/config/auto.conf are missing."; \ echo " Run 'make oldconfig && make prepare' on kernel src to fix it."; \ echo; \ /bin/false)

mkdir -p /home/lahaye/rpmbuild/BUILD/ndas-1.1-24/.tmp_versions ; rm -f /home/lahaye/rpmbuild/BUILD/ndas-1.1-24/.tmp_versions/* make -f scripts/Makefile.build obj=/home/lahaye/rpmbuild/BUILD/ndas-1.1-24

gcc -Wp,-MD,/home/lahaye/rpmbuild/BUILD/ndas-1.1-24/block/.block24.o.d -nostdinc -isystem /usr/lib/gcc/i586-manbo-linux-gnu/4.3.2/include -DKERNEL -Iinclude -I/usr/src/linux-2.6.28-desktop-2mnb/arch/x86/include -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -O2 -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=i686 -mtune=generic -Wa,-mtune=generic32 -ffreestanding -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Iarch/x86/include/asm/mach-default -fno-stack-protector -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -Wdeclaration-after-statement -Wno-pointer-sign -DMODULE -DLINUX -I/home/lahaye/rpmbuild/BUILD/ndas-1.1-24/inc -D_X86 -DNDAS_MAX_SLOT=16 -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(block24)" -D"KBUILD_MODNAME=KBUILD_STR(ndas_block)" -D"DEBUG_HASH=60" -D"DEBUG_HASH2=34" -c -o /home/lahaye/rpmbuild/BUILD/ndas-1.1-24/block/block24.o /home/lahaye/rpmbuild/BUILD/ndas-1.1-24/block/block24.c gcc -Wp,-MD,/home/lahaye/rpmbuild/BUILD/ndas-1.1-24/block/.block26.o.d -nostdinc -isystem /usr/lib/gcc/i586-manbo-linux-gnu/4.3.2/include -DKERNEL -Iinclude -I/usr/src/linux-2.6.28-desktop-2mnb/arch/x86/include -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -O2 -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=i686 -mtune=generic -Wa,-mtune=generic32 -ffreestanding -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Iarch/x86/include/asm/mach-default -fno-stack-protector-fno-omit-frame-pointer -fno-optimize-sibling-calls -g -Wdeclaration-after-statement -Wno-pointer-sign -DMODULE -DLINUX -I/home/lahaye/rpmbuild/BUILD/ndas-1.1-24/inc -D_X86 -DNDAS_MAX_SLOT=16 -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(block26)" -D"KBUILD_MODNAME=KBUILD_STR(ndas_block)" -D"DEBUG_HASH=60" -D"DEBUG_HASH2=34" -c -o /home/lahaye/rpmbuild/BUILD/ndas-1.1-24/block/block26.o /home/lahaye/rpmbuild/BUILD/ndas-1.1-24/block/block26.c

/home/lahaye/rpmbuild/BUILD/ndas-1.1-24/block/block26.c:54: attention : initialization from incompatible pointer type /home/lahaye/rpmbuild/BUILD/ndas-1.1-24/block/block26.c:55: attention : initialization from incompatible pointer type /home/lahaye/rpmbuild/BUILD/ndas-1.1-24/block/block26.c:56: attention : initialization from incompatible pointer type /home/lahaye/rpmbuild/BUILD/ndas-1.1-24/block/block26.c: In function ‘nbio_alloc’: /home/lahaye/rpmbuild/BUILD/ndas-1.1-24/block/block26.c:156: erreur: ‘struct request’ has no member named ‘nr_hw_segments’ /home/lahaye/rpmbuild/BUILD/ndas-1.1-24/block/block26.c: In function ‘nblk_request_proc’: /home/lahaye/rpmbuild/BUILD/ndas-1.1-24/block/block26.c:438: erreur: ‘REQ_FAILFAST’ undeclared (first use in this function) /home/lahaye/rpmbuild/BUILD/ndas-1.1-24/block/block26.c:438: erreur: (Each undeclared identifier is reported only once /home/lahaye/rpmbuild/BUILD/ndas-1.1-24/block/block26.c:438: erreur: for each function it appears in.) make[2]: *** /home/lahaye/rpmbuild/BUILD/ndas-1.1-24/block/block26.o Erreur 1 make[1]: *** [_module_/home/lahaye/rpmbuild/BUILD/ndas-1.1-24] Erreur 2 make[1]: quittant le répertoire « /usr/src/linux-2.6.28-desktop-2mnb » make: *** /home/lahaye/rpmbuild/BUILD/ndas-1.1-24/ndas_sal.ko Erreur 2 erreur: Mauvais status de sortie pour /var/tmp/rpm-tmp.A3AfX4 (%build)

Erreur de construction de RPM:

Mauvais status de sortie pour /var/tmp/rpm-tmp.A3AfX4 (%build)

Best regards,

Olivier.

01/05/09 23:10:32 changed by anonymous

Molto bene ,very good i'm italian linux ubuntu user kernel 2.6.27-9 Thx


Add/Change #839 (Error on bulding ndas-modules)