:: Re: [DNG] Packaging Vdev - compilat…
Góra strony
Delete this message
Reply to this message
Autor: aitor_czr
Data:  
Dla: shraptor, Didier Kryn, dng
Temat: Re: [DNG] Packaging Vdev - compilation errors and patch


On 03/22/2016 05:01 PM, aitor_czr wrote:
>
> On 03/22/2016 04:35 PM, shraptor <shraptor@???> wrote:
>> With
>>
>>    > gcc --version
>> gcc (GCC) 5.2.0
>> ...

>>
>>
>> and then
>>
>> git clonehttps://github.com/jcnelson/vdev
>>
>> I get
>>
>> https://gist.github.com/suedi/71d374d6f7925c5999e9#file-vdevd_compilation_output
>>
>>
>> with no errors when issuing make -C vdevd
>>
>>
>> and then tried
>>
>> git clonehttps://git.devuan.org/unsystemd/vdev.git
>>
>> and make -C vdevd still worked
>> allthough looking at the last commit the repos are not fully
>> synchronized.
>>
>>
>> Where did you put your patches?
>>
>>
>>
>>> >
>>> >This is corrected by my first patch, include-sysmacros.diff
>>> >The two other patches allow the user to provide additional CFLAGS
>>> >and/or LDFLAGS to better control building, for example to build
>>> >statically or to provide librabies in non-standard places.
>> Since I don't see your patches as pull requests on
>> https://github.com/jcnelson/vdev
>> maybe that means you are using the devuan repo?? and it is not
>> synchronized with
>> main repo??
>>
>>
>>
>
>
> I can build succesfully vdevd, libvdev, libudev-compat, hwdb, pstat
> and fskit in jessie (gcc-4.9.2). The only one i can't build is vdevfs
> because the compiler can't find <iostream>, contained in the fskit's
> headers (vdevfs invokes to <fskit/fskit.h>):
>
>
> $ make -C fs
> make: Entering directory '/home/aitor/00000000-VDEV/vdev/fs'
> cc -Wall -std=c99 -g -fPIC -fstack-protector -fstack-protector-all 
> -pthread -Wno-unused-variable -Wno-unused-but-set-variable -I. 
> -I/home/aitor/vdev -I/home/aitor/vdev/build/include -D_THREAD_SAFE 
> -D__STDC_FORMAT_MACROS -D_VDEV_OS_LINUX -D_XOPEN_SOURCE=700 
> -D_FILE_OFFSET_BITS=64 -o "/home/aitor/vdev/build/usr/sbin/acl.o" -c 
> "acl.c"
> cc -Wall -std=c99 -g -fPIC -fstack-protector -fstack-protector-all 
> -pthread -Wno-unused-variable -Wno-unused-but-set-variable -I. 
> -I/home/aitor/vdev -I/home/aitor/vdev/build/include -D_THREAD_SAFE 
> -D__STDC_FORMAT_MACROS -D_VDEV_OS_LINUX -D_XOPEN_SOURCE=700 
> -D_FILE_OFFSET_BITS=64 -o "/home/aitor/vdev/build/usr/sbin/main.o" -c 
> "main.c"
> In file included from /usr/include/fskit/fskit.h:25:0,
>                  from fs.h:27,
>                  from main.h:26,
>                  from main.c:22:
> /usr/include/fskit/common.h:63:20: fatal error: iostream: No such file 
> or directory
>  #include <iostream>
>                     ^
> compilation terminated.

>
>
> It's curious, because i have no issue building fskit. I'm having a
> look at buildconf.mk
>
> Aitor.


Solved doing:

CC        :=g++


in the Makefile. Even though i get some errors:


[...]

fs.c:142:28: error: ‘fskit_entry_new’ was not declared in this scope
     child = fskit_entry_new();
                             ^
fs.c:152:93: error: invalid conversion from ‘__uid_t {aka unsigned int}’ 
to ‘const char*’ [-fpermissive]
        rc = fskit_entry_init_file( child, sb.st_ino, sb.st_uid, 
sb.st_gid, sb.st_mode & 0777 );


[...]

Ok, Jude Nelson advised:

*The vdev_subprocess error comes from trying to build vdevfs, an
optional add-on to vdev that is still under development and has not bee
sync'ed with some recent changes to the rest of the codebase. You can
avoid building it with no loss of functionality*

Aitor