# Error Emerging Captive NTFS

## JollyRoger

I'm trying to emerge Captive NTFS (captive-1.1.7) on my system but I run into the following error compiling the first (and only) dependency sys-fs/fuse-2.4.1-r1:

```

...

config.status: creating config.h

make -C /usr/src/linux M=/var/tmp/portage/fuse-2.4.1-r1/work/fuse-2.4.1/kernel  modules

make[1]: Entering directory `/usr/src/linux-2.6.16-gentoo'

  CC [M]  /var/tmp/portage/fuse-2.4.1-r1/work/fuse-2.4.1/kernel/dev.o

  CC [M]  /var/tmp/portage/fuse-2.4.1-r1/work/fuse-2.4.1/kernel/dir.o

  CC [M]  /var/tmp/portage/fuse-2.4.1-r1/work/fuse-2.4.1/kernel/file.o

/var/tmp/portage/fuse-2.4.1-r1/work/fuse-2.4.1/kernel/file.c: In function `fuse_direct_write':

/var/tmp/portage/fuse-2.4.1-r1/work/fuse-2.4.1/kernel/file.c:608: error: structure has no member named `i_sem'

/var/tmp/portage/fuse-2.4.1-r1/work/fuse-2.4.1/kernel/file.c:610: error: structure has no member named `i_sem'

make[2]: *** [/var/tmp/portage/fuse-2.4.1-r1/work/fuse-2.4.1/kernel/file.o] Error 1

make[1]: *** [_module_/var/tmp/portage/fuse-2.4.1-r1/work/fuse-2.4.1/kernel] Error 2

make[1]: Leaving directory `/usr/src/linux-2.6.16-gentoo'

make: *** [all-spec] Error 2

!!! ERROR: sys-fs/fuse-2.4.1-r1 failed.

!!! Function linux-mod_src_compile, Line 504, Exitcode 2

!!! Unable to make                                  majver=2.6

                          fusemoduledir=//lib/modules/2.6.16-gentoo/fs all.

!!! If you need support, post the topmost build error, NOT this status message.

```

Any ideas? I doubt this would make it into portage if this sort of error were happening to others.

Thanks.

----------

## Zee

you can use the fuse module that's already in the kernel.

----------

## viciouscircle

At first, hello y'all, this is my very first post on gentoo forums.

I've got the same problem building that module, but it seems like this is a general problem of the 2.6.16 kernel (I'm using the kernel.org version, though).

I had the same Problem installing  the nvidia drivers from www.nvidia.com, but they had a patch for making one able to build the nvidia module.

However, I still don't know how this can be fixed for all cases  :Sad: 

I wonder if anyone has some more precise information on this topic?

----------

## Zee

I had some problems with Captive on my 2.6.15-suspend2-r8 (previosly the same version but with gentoo patches). captive would compile and install just fine, but after a reboot the fuse module wouldn't load. after some searching I found out I can use the kernel fuse module. Recompiled the kernel and now everything is fine & dandy.

zee

----------

## humbletech99

I thought Captive NTFS didn't work any more, as of XP Sp2, are you trying to use it for an older version of windows?

----------

## Zee

I use captive to access my Windows XP Pro SP2 partition and my external disk drive.

----------

## humbletech99

ok maybe I read wrong or they updated it or something, but I distinctly remember seeing it somewhere written captive nfts is dead...

anyway, is it very slow to write to ntfs partitions? i heard it's not as fast as writing natively which would make sense since it needs to emulate to use the windows driver for ntfs...

In fact, considering that things like captive ntfs and ndiswrapper and wine work by windows emultation, why don't we have a whole kernel section on this for interoperability, the way BSD can run linux binaries? Seems that's the direction we're heading in anyway since it's the only way some of these things get done...

----------

## Zee

It was almost dead for more than a year. The page was not updated, the module would not compile under 2.6.0 kernel & such. That's why I was so happy to see a working ebuild for the thing.

the writing is a bit slow when compared to native NTFS writing.

zee

----------

## JollyRoger

Yes, I am using kernel 2.6.16. I've compiled and installed the fuse module from the kernel but portage still wants to install sys-fs/fuse-2.4.1-r1 when I emerge captive. How should I prevent sys-fs/fuse from being installed if it is a dependency of captive?

----------

## Zee

this should do the trick: echo ' sys-fs/fuse-2.4.1' >> /etc/portage/profile/package.provided

zee

----------

## JollyRoger

Actually I managed to compile sys-fs/fuse-2.5.2 (the latest in portage) with my 2.6.16 kernel. It shouldn't matter if I use this or the kernel's module right? However now I get an error compiling captive-1.1.7-r1. 

Complete error message:

```

 i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -DLOCALEDIR=\"/usr/share/locale\" -I../../../src/libcaptive/include -I../../../intl -DLIBCAPTIVE -I../../../src/libcaptive/reactos/include -I../../../reactos/include -I../../../reactos/ntoskrnl/include -I. -I. -I../../../ -pthread -DORBIT2=1 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include -I/usr/include/bonobo-activation-2.0 -I/usr/include/libbonobo-2.0 -I/usr/include/gconf/2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/orbit-2.0 -DCAPTIVE_USE_GNOME_VFS=1 -O2 -march=i686 -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -MT librtl_la-time.lo -MD -MP -MF .deps/librtl_la-time.Tpo -c time.c  -fPIC -DPIC -o .libs/librtl_la-time.o

time.c:90:34: missing terminating " character

make[7]: *** [librtl_la-time.lo] Error 1

make[7]: Leaving directory `/var/tmp/portage/captive-1.1.7-r1/work/captive-1.1.7/src/libcaptive/rtl'

make[6]: *** [all] Error 2

make[6]: Leaving directory `/var/tmp/portage/captive-1.1.7-r1/work/captive-1.1.7/src/libcaptive/rtl'

make[5]: *** [all-recursive] Error 1

make[5]: Leaving directory `/var/tmp/portage/captive-1.1.7-r1/work/captive-1.1.7/src/libcaptive'

make[4]: *** [all] Error 2

make[4]: Leaving directory `/var/tmp/portage/captive-1.1.7-r1/work/captive-1.1.7/src/libcaptive'

make[3]: *** [all-recursive] Error 1

make[3]: Leaving directory `/var/tmp/portage/captive-1.1.7-r1/work/captive-1.1.7/src'

make[2]: *** [all] Error 2

make[2]: Leaving directory `/var/tmp/portage/captive-1.1.7-r1/work/captive-1.1.7/src'

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory `/var/tmp/portage/captive-1.1.7-r1/work/captive-1.1.7'

make: *** [all] Error 2

!!! ERROR: sys-fs/captive-1.1.7-r1 failed.

!!! Function src_compile, Line 55, Exitcode 2

!!! emake failed

!!! If you need support, post the topmost build error, NOT this status message.

```

gcc complains that /var/tmp/portage/captive-1.1.7-r1/work/captive-1.1.7/src/libcaptive/rtl/time.c has en error on line 90. Upon closer inspection of time.c I see the following:

```

#if TICKSTO1970%TICKSPERSEC

#error "Unsupported: TICKSTO1970""

#endif

```

The #error line is line 90. Notice the repetion of the double quotes at the end of that line. Bug?Last edited by JollyRoger on Mon Mar 27, 2006 6:50 am; edited 1 time in total

----------

## evilspoons

I just got the same error as you, JollyRoger, compiling captive-1.1.7-r1 on my x86-stable box. I'm still running 2.6.15-r1...

----------

## Zee

just compiled cleanly on my 2.6.15-suspend2-r8 system.

----------

## JollyRoger

It shouldn't matter what kernel is being run. That is a syntax error in C.

----------

## Zee

It should not matter but why did Captive compile cleanly on my machine.

Are you perhaps using some LDFLAGS?

----------

## JollyRoger

I'm not using any LDFLAGS that I know of. That is to say, I did not go out of my way to set or unset any LDFLAGS. I don't know if you program in C or not but a syntax error should be recognized by the compiler (as it is on my system) and has nothing to with the linker. Perhaps your version of gcc is able to automatically correct that particular syntax error wheras mine is not? I'm using gcc 3.3.6.

Also, I can confirm that if that one extra double quote at the end of line 93 of time.c is removed, the package compiles cleanly and works fine. I simply modified time.c and emerged captive again. However, every time I would emerge captive, time.c would go back to it's original state (with the syntax problem). So I had to first do "emerge captive" and then quickly modify the file before the emerging process would get to the time.c file. Quite a hack. Hopefully the next release should fix this syntax problem.

I'll file a bug report but I don't see how something as obvious as this would have made it to portage.

----------

## Zee

the it's probably due to the different compiler. I use gcc (GCC) 3.4.4.

----------

## esprout

 *JollyRoger wrote:*   

> 
> 
> gcc complains that /var/tmp/portage/captive-1.1.7-r1/work/captive-1.1.7/src/libcaptive/rtl/time.c has en error on line 90. Upon closer inspection of time.c I see the following:
> 
> ```
> ...

 

I ran into the same issue with gcc version 3.3.6.  Upon changing to gcc version 3.4.5 with gcc-config, the error went away.  This sounds like a bug to me, as it shouldn't break with gcc 3.3.6.

The source of the problem is in the line in the ebuild:

sed -i 's/#error "Unsupported: TICKSTO1970/\0"/' src/libcaptive/rtl/time.c

To hack around the problem with gcc 3.3.6, you may try commenting out that line in the ebuild, or editing the time.c file while it's compiling (but after emerge has already ran sed on time.c).

----------

## Kisil

I'm having the same trouble with the repeated "".

my emerge info is here: https://forums.gentoo.org/viewtopic-p-3232764.html

----------

