Lars Täuber | 18 Apr 2012 11:21
X-Face
Picon
Favicon

ggaoed under kernel 3.2.0 or newer

Hi there!

I just tried to compile ggaoed under ubuntu 12.04 LTS amd64 server.
Does anyone had succes with this?
I get complaints about the following:
make  all-recursive
make[1]: Entering directory `/usr/src/ggaoed-r131'
Making all in .
make[2]: Entering directory `/usr/src/ggaoed-r131'
gcc  -Wall -Wmissing-prototypes -Wstrict-prototypes -Wsign-compare -g -O2   -o ggaoed ctl.o device.o
ggaoed.o mem.o netlink.o network.o -lglib-2.0   -lrt -latomic_ops -lblkid -laio 
device.o: In function `open_dev':
/usr/src/ggaoed-r131/device.c:332: undefined reference to `S_ISBLK'
/usr/src/ggaoed-r131/device.c:342: undefined reference to `S_ISBLK'
/usr/src/ggaoed-r131/device.c:352: undefined reference to `S_ISBLK'
device.o: In function `setup_dev':
/usr/src/ggaoed-r131/device.c:332: undefined reference to `S_ISREG'
device.o: In function `validate_dev_fd':
/usr/src/ggaoed-r131/device.c:403: undefined reference to `S_ISBLK'
collect2: ld returned 1 exit status
make[2]: *** [ggaoed] Error 1
make[2]: Leaving directory `/usr/src/ggaoed-r131'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/ggaoed-r131'
make: *** [all] Error 2

I added

#include <linux/stat.h>

(Continue reading)

Lars Täuber | 18 Apr 2012 12:20
X-Face
Picon
Favicon

Re: ggaoed under kernel 3.2.0 or newer

Hi there again!

Am Wed, 18 Apr 2012 11:21:40 +0200
Lars Täuber <taeuber <at> bbaw.de> schrieb:
> Hi there!
> 
> I just tried to compile ggaoed under ubuntu 12.04 LTS amd64 server.
> Does anyone had succes with this?
> I get complaints about the following:
> make  all-recursive
> make[1]: Entering directory `/usr/src/ggaoed-r131'
> Making all in .
> make[2]: Entering directory `/usr/src/ggaoed-r131'
> gcc  -Wall -Wmissing-prototypes -Wstrict-prototypes -Wsign-compare -g -O2
> -o ggaoed ctl.o device.o ggaoed.o mem.o netlink.o network.o -lglib-2.0
> -lrt -latomic_ops -lblkid -laio device.o: In function
> `open_dev': /usr/src/ggaoed-r131/device.c:332: undefined reference to
> `S_ISBLK' /usr/src/ggaoed-r131/device.c:342: undefined reference to
> `S_ISBLK' /usr/src/ggaoed-r131/device.c:352: undefined reference to
> `S_ISBLK' device.o: In function
> `setup_dev': /usr/src/ggaoed-r131/device.c:332: undefined reference to
> `S_ISREG' device.o: In function
> `validate_dev_fd': /usr/src/ggaoed-r131/device.c:403: undefined reference
> to `S_ISBLK' collect2: ld returned 1 exit status make[2]: *** [ggaoed]
> Error 1 make[2]: Leaving directory `/usr/src/ggaoed-r131'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/usr/src/ggaoed-r131'
> make: *** [all] Error 2
> 
> 
(Continue reading)

Hilko Bengen | 18 Apr 2012 18:43
Picon

Re: ggaoed under kernel 3.2.0 or newer

* Lars Täuber:

> I'm not a programmer but solved it eventually.

Good. I can confirm the compile failure on a current Debian/unstable
box. It's a bug in the source code.

> There is no <sys/stat.h> file in the system. 

Yes, there should be, as part of libc6-dev.
(/usr/include/i386-linux-gnu/sys/stat.h in my case.)

> So I added
> #include <sys/stat.h>
> to device.c and it compiled.

This is a sane solution.

> How does this work?

S_ISBLK is a macro that is expanded by the preprocessor. If it is not
available becaus sys/stat.h has not been included, the compiler will
assume that it S_ISBLK is a function so it turns it into a symbol that
the linker has to resolve.

HTH,
-Hilko

------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
(Continue reading)

Lars Täuber | 19 Apr 2012 09:22
X-Face
Picon
Favicon

Re: ggaoed under kernel 3.2.0 or newer

Hi Hilko,

Am Wed, 18 Apr 2012 18:43:34 +0200
Hilko Bengen <bengen <at> hilluzination.de> schrieb:
> * Lars Täuber:
> 
> > I'm not a programmer but solved it eventually.
> 
> Good. I can confirm the compile failure on a current Debian/unstable
> box. It's a bug in the source code.
> 
> > There is no <sys/stat.h> file in the system. 
> 
> Yes, there should be, as part of libc6-dev.
> (/usr/include/i386-linux-gnu/sys/stat.h in my case.)

aaahh, ok. I found mine in /usr/include/x86_64-linux-gnu/sys. I was expecting
in it /usr/include/sys. But here is no such directory on the machine.

> > So I added
> > #include <sys/stat.h>
> > to device.c and it compiled.
> 
> This is a sane solution.
> 
> > How does this work?
> 
> S_ISBLK is a macro that is expanded by the preprocessor. If it is not
> available becaus sys/stat.h has not been included, the compiler will
> assume that it S_ISBLK is a function so it turns it into a symbol that
(Continue reading)

Hilko Bengen | 19 Apr 2012 09:39
Picon

Re: ggaoed under kernel 3.2.0 or newer

* Lars Täuber:

>> Yes, there should be, as part of libc6-dev.
>> (/usr/include/i386-linux-gnu/sys/stat.h in my case.)
>
> aaahh, ok. I found mine in /usr/include/x86_64-linux-gnu/sys. I was
> expecting in it /usr/include/sys. But here is no such directory on the
> machine.

Welcome to the wonderful world of multiarch. :-)

> My question was how could an »#include <sys/stat.h> « be accepted when
> there is no such file. But now I know where look at.

Perhaps the check in the configure script is wrong. Is sys/stat.h
recognized correctly after running autoreconf?

-Hilko

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Aoetools-discuss mailing list
Aoetools-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aoetools-discuss
Lars Täuber | 19 Apr 2012 09:56
X-Face
Picon
Favicon

Re: ggaoed under kernel 3.2.0 or newer

Am Thu, 19 Apr 2012 09:39:36 +0200
Hilko Bengen <bengen <at> hilluzination.de> schrieb:

> > My question was how could an »#include <sys/stat.h> « be accepted when
> > there is no such file. But now I know where look at.
> 
> Perhaps the check in the configure script is wrong. Is sys/stat.h
> recognized correctly after running autoreconf?

I think the check is correct. Otherwise it wouldn't #define HAVE_SYS_STA_H 1
in config.h, won't it?
How do I test?
Autoreconf doesn't complain about anything.

Lars

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Aoetools-discuss mailing list
Aoetools-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aoetools-discuss
Hilko Bengen | 19 Apr 2012 13:16
Picon

Re: ggaoed under kernel 3.2.0 or newer

* Lars Täuber:

> I think the check is correct. Otherwise it wouldn't #define
> HAVE_SYS_STA_H 1 in config.h, won't it?

Right.

I was confused and thought that HAVE_SYS_STAT_H was not defined before.

Please report the issue at
<https://code.google.com/p/ggaoed/issues/list> and add the one-line
patch so that other people can discover that the problem has been solved
even if no fixed version is released.

Cheers,
-Hilko

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Aoetools-discuss mailing list
Aoetools-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aoetools-discuss
Lars Täuber | 19 Apr 2012 13:55
X-Face
Picon
Favicon

Re: ggaoed under kernel 3.2.0 or newer

Hallo Hilken,

Am Thu, 19 Apr 2012 13:16:43 +0200
Hilko Bengen <bengen <at> hilluzination.de> schrieb:
> * Lars Täuber:
> 
> > I think the check is correct. Otherwise it wouldn't #define
> > HAVE_SYS_STA_H 1 in config.h, won't it?
> 
> Right.
> 
> I was confused and thought that HAVE_SYS_STAT_H was not defined before.
> 
> Please report the issue at
> <https://code.google.com/p/ggaoed/issues/list> and add the one-line
> patch so that other people can discover that the problem has been solved
> even if no fixed version is released.

I don't have a google account, but the problem is already listed here:
https://code.google.com/p/ggaoed/issues/detail?id=12
With the solution too.

Lars

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
(Continue reading)


Gmane