Trouble compiling libeio

Hi!

I’ve trouble compiling libeio on my openSUSE 11.4 x86_64:


$ su 
# cd /usr/src/
# cvs -z3 -d :pserver:anonymous@cvs.schmorp.de/schmorpforge co libeio
# cd libeio/
# ./autogen.sh
# ./configure 
...
**config.status: error: cannot find input file: `Makefile.in'**
# autoreconf 
# ./configure  
# make 
make  all-am
make[1]: Entering directory `/usr/src/libeio'
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.     -O3 -g -O2 -c -o eio.lo eio.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -O3 -g -O2 -c eio.c  -fPIC -DPIC -o .libs/eio.o
eio.c: In function ‘eio__sync_file_range’:
eio.c:888:44: error: ‘SYNC_FILE_RANGE_WAIT_BEFORE’ undeclared (first use in this function)
eio.c:888:44: note: each undeclared identifier is reported only once for each function it appears in
eio.c:889:44: error: ‘SYNC_FILE_RANGE_WRITE’ undeclared (first use in this function)
eio.c:890:44: error: ‘SYNC_FILE_RANGE_WAIT_AFTER’ undeclared (first use in this function)
make[1]: *** [eio.lo] Error 1
make[1]: Leaving directory `/usr/src/libeio'
make: *** [all] Error 2

Versions:

glibc version: 2.11.3-12.15.1
glibc-devel version: 2.11.3-12.15.1
kernel-headers version: 2.6.28-2.2.moblin2
autoconf version: 2.68
automake version: 1.11.1
autoreconf version: 2.68
autoheader version: 2.68
libtoolize version: 2.2.6b
aclocal version: 1.11.1

All packages are up to date now. I’ve also installed libaio, libaio-devel.

On the library support IRC channel they just said, that the constants should be in bits/fcntl.h.
I tried add it via -I/usr/include/bits in Makefile. But this failed also.

Please help me figure out, what’s wrong in my configuration.

Regards.

On 05/29/2011 09:36 PM, ruslan osmanov wrote:
> I’ve trouble compiling ‘libeio’
>
> $ su

you may have other problems, but do not run ./configure or make as root

and, i also wouldn’t connect to any distant server as root, ever!


dd CAVEAT: http://is.gd/bpoMD
[NNTP via openSUSE 11.4 [2.6.37.6-0.5] + KDE 4.6.0 + Thunderbird 3.1.10]
Dual booting with Sluggish Loser7 on Acer Aspire One D255

DenverD wrote:

> On 05/29/2011 09:36 PM, ruslan osmanov wrote:
>> I’ve trouble compiling ‘libeio’
>>
>> $ su
>
> you may have other problems, but do not run ./configure or make as root
>
> and, i also wouldn’t connect to any distant server as root, ever!
>
+1

never autogne.sh, configure, make or similar as root, never!!
only if everything succeeds you run a “make install” as root
and it makes not much sense to download the source code to /usr/src

Beside that the for the error
config.status: error: cannot find input file: `Makefile.in’
I would ask the developer on his irc (this is software from cvs not
something stable)
http://chat.schmorp.de/?channels=schmorpforge


PC: oS 11.3 64 bit | Intel Core2 Quad Q8300@2.50GHz | KDE 4.6.3 | GeForce
9600 GT | 4GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.6.0 | nVidia
ION | 3GB Ram

Hi
Have a look at the spec file here under ‘SOURCES’…
https://build.opensuse.org/package/show?package=libeio&project=home%3Amalcolmlewis%3ATesting

Once it has built, should be here;
software.opensuse.org: Search Results

your error looks very much like the libeio was wrote/built for a slightly older version of gcc

over the years of using fedora i had very often come across issues with gcc4.1 when it was VERY new
the same for 4.3,4.4,4.5 and 4.6

some slightly older code might NOT build with the very new version of gcc ( without some hacking )

the suse repos have 4.1 and 4.3 along with 4.5 and 4.6 ( 3.4 also)

install and set 4.3 and set the default gcc as 4.3 and NOT 4.5 . I do this with a shell script to make links to the 4 different ones i have installed .

then try a rebuild.

Hi
No, it builds fine with gcc 4.5 and 4.6 it’s the lack of CFLAGS which was the issue… see the rpm spec file and build logs :wink:

DenverD, yes, I know. Normally, I do things as normal user.

I’m running it on a development machine. I just wanted to show that it isn’t a permissions problem at least.

Thanks.

Originally I made it in $HOME/projects/… as a normal user. As I replied DenverD, I just wanted be sure it isn’t some kind of permissions(umask) problem.

Unfortunately, they are not so responsive there on the IRC channel, as you guys :wink:

Thank you.

Huh, the same issue on Ubuntu 11.04 i696. But I’ve got it working…

malcolmlewis, thank you! Indeed, it lacks -D_GNU_SOURCE “CFLAG”. I’ve managed to successfully compile and install libeio DEB and RPM packages.

Many thanks! Marking this thread as resolved :slight_smile:

On 05/30/2011 07:36 AM, ruslan osmanov wrote:
>
> I’m running it on a development machine. I just wanted to show that it
> isn’t a permissions problem at least.

but, i do not think running any of those prior to make install as root
will help you learn if the problem you are having is a permissions problem…

i mean, if it is a permissions problem when running as user the error
will say something like “Unable to access libWhatever” or even “Can’t
find libWhatever” and you know it is a problem and without running as
root you can use locate or find to see where the lib lives, if it
does…and other tools to make sure it is in the right place and with
the right permissions…

anyway, my experience is (reading here) that more problems are
introduced by running pre-“make install” as root than can be solved (or
even discovered) by the same…

ymmv


dd CAVEAT: http://is.gd/bpoMD
[NNTP via openSUSE 11.4 [2.6.37.6-0.5] + KDE 4.6.0 + Thunderbird 3.1.10]
Dual booting with Sluggish Loser7 on Acer Aspire One D255

And adding to all the remarks about running things as root that shouldn’t be: it shows bad things to beginners. And bad habits, once settled down are allways very difficult to redress again. Please do not post things running as root where they shouldn’t in the future here. Escpecialy when you do not add any explanation why it is harmless in this your specific case. (And like DenveD I thinks it is not harmless, it only makes you post less understandable because you do not show your original problem).

Not mentioned until now, but a hobby horse of mine. When you change to root in a terminal do

su -

and not

su

See the *man su *page and several posts on these forums when you do not understand why.

DenverD, I’ve got it working now :slight_smile:

Of course, I could probably locate permissions errors by parsing the long output with indirect messages.
But to run it as root was a quick and dirty way to show the clue of the problem, not looking pretty good though.

Nevertheless, thank you. I understand, it could even irritate to look at how everything is done by root… )

On 05/30/2011 11:06 AM, ruslan osmanov wrote:
>
> DenverD, I’ve got it working now :slight_smile:

so, what was wrong?
was it a permissions problem???

> But to run it as root was a quick and dirty way

i’ll agree with ‘dirty’, messy, wrong, dangerous…

but i will not agree with ‘quick’ because it only tells you that what it
was looking for existed somewhere, and had permissions set to
something that root could use…

tells you nothing else and gives no clue of what to do next…

well, if you then use the executable derrived from a pure root
environment you give up a lot of stability, security, reliability etc.

don’t do it…if you wanna do everything as root, run Windows.


dd CAVEAT: http://is.gd/bpoMD
[NNTP via openSUSE 11.4 [2.6.37.6-0.5] + KDE 4.6.0 + Thunderbird 3.1.10]
Dual booting with Sluggish Loser7 on Acer Aspire One D255

The problem was it was missing -D_GNU_SOURCE in CFLAGS.

Hey, I really aware a big potential harm of doing things as root!
I posted it to not follow my steps, but to show clearly, that it’s a compilation error not regarding to anything else.
Because every time I ask something in a forum, or IRC, people suspect first I’ve insufficient privileges…

Moreover, I’m using umask 0027 instead of “standard” 0022, use sticky bit where appropriate etc.
I really understand the risks running a command as root, and I’m not a beginner: I’m fully on Linux for 2.5 years and nothing could make me to return to Windows!
:slight_smile:

Thus, I’d concentrate on the real compilation error here, instead of blabbing about potential harmful consequences of running something as root.

I really understand the risks running a command as root, and I’m not a beginner: I’m fully on Linux for 2.5 years and nothing could make me to return to Windows!
The problem is not you doing things (it is your system, you may throw it out of te window, local law permitting ;)), the problem is posting a problem, mixing it with doing this without further explanation (thus we realy can not know you “understand the risks”). This is something that we do not like to be seen by Linux users less knowing then you without at least strong warnings. And it makes the problem description more troublesome.

Hmm. I’ve got it now ) I’m sorry. I’ll take it into account next time.

You are welcome here. Feel free to aks next time you encounter a problem. Enjoy openSUSE.