ayourtch / lsyncd

Automatically exported from code.google.com/p/lsyncd
GNU General Public License v2.0
0 stars 0 forks source link

compilatio errors on SLES 10. #70

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

my organization server is on suse enterprise linux (64 bit version ) - 10 and 
we are trying to implement lsyncd but have these problems while building 
lsyncd-2.0.4 from source :

i have LUA installed. as per suggestion in one of similar issue found here, 

1. from /etc directory of lua packgae i copied lua.pc to /usr/lib64/pkgconfig 
and 

2.i even changed /usr/lib64/pkgconfig/lua.pc to /usr/lib64/pkgconfig/lua5.1.pc

and now when i am trying to configure i get the error as :

---------------------------------------------------------------
BigBang:~/downloads/lsyncd-2.0.4 # ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... (cached) yes
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LUA... no
checking for LUA... no
checking for LUA... no
checking for LUA... configure: error: Package requirements (lua >= 5.1.3) were 
not met:

Package lua was not found in the pkg-config search path.
Perhaps you should add the directory containing `lua.pc'
to the PKG_CONFIG_PATH environment variable
No package 'lua' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LUA_CFLAGS
and LUA_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
-----------------------------------------------------------------

I am struck with this for the past 48 hours. Thanks for any incoming help.

best regards,

Vishz.

Original issue reported on code.google.com by thevi...@gmail.com on 21 Jun 2011 at 12:37

GoogleCodeExporter commented 9 years ago
How about doing what autoconf suggest you to? Provide LUA_CFLAGS and LUA_LIBS 
to circumvent package detection.

e.g:
 LUA_CFLAGS="-I /home/axel/lua-5.1.4/src/" LUA_LIBS="/home/axel/lua-5.1.4/src/liblua.a" ./configure

This will link the lua interpreter statically into lsyncd.

Original comment by axk...@gmail.com on 21 Jun 2011 at 1:09

GoogleCodeExporter commented 9 years ago
hmm... configure succeeded with your suggestion :

----------------------------------------------------------
 LUA_CFLAGS="-I /root/downloads/essentials/lua-5.1.4/src/" LUA_LIBS="/root/downloads/essentials/lua-5.1.4/src/liblua.a" ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... (cached) yes
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LUA... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking sys/inotify.h usability... yes
checking sys/inotify.h presence... yes
checking for sys/inotify.h... yes
compiling with inotify
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
--------------------------------------------------

Original comment by thevi...@gmail.com on 21 Jun 2011 at 1:29

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Thanks for the very quick help ... but i do have problem now with make as below 
:

-------------------------------------------------------------------

BigBang:~/downloads/lsyncd-2.0.4 # make
make  all-am
make[1]: Entering directory `/root/downloads/lsyncd-2.0.4'
gcc -DHAVE_CONFIG_H -I.     -g -O2 -Wall -I 
/root/downloads/essentials/lua-5.1.4/src/ -MT inotify.o -MD -MP -MF 
.deps/inotify.Tpo -c -o inotify.o inotify.c
inotify.c:62: error: âIN_DONT_FOLLOWâ undeclared here (not in a function)
inotify.c:62: error: âIN_ONLYDIRâ undeclared here (not in a function)
make[1]: *** [inotify.o] Error 1
make[1]: Leaving directory `/root/downloads/lsyncd-2.0.4'
make: *** [all] Error 2
BigBang:~/downloads/lsyncd-2.0.4 #
-----------------------------------------

Any inputs on how to resolve the " make issue "

Original comment by thevi...@gmail.com on 21 Jun 2011 at 1:31

GoogleCodeExporter commented 9 years ago
This isn't a "make issue", its about the system your installing it to being 
likely too old. IN_DONT_FOLLOW was added at glic 2.5, I suppose your glibc is 
older?

Before you run problems later on, rsync needs to be >= 3.0 as well.

Original comment by axk...@gmail.com on 21 Jun 2011 at 1:44

GoogleCodeExporter commented 9 years ago
ah rsync version is 2.6.8 as well , and :

 ldd --version
ldd (GNU libc) 2.4
 ------------------

so glibc is 2.4 i need to update it. do i also need to update rsync to 3.0 
before installing lsyncd. ?

Original comment by thevi...@gmail.com on 21 Jun 2011 at 1:56

GoogleCodeExporter commented 9 years ago
No, but it wont work proper with rsync < 3.0

Original comment by axk...@gmail.com on 21 Jun 2011 at 2:59

GoogleCodeExporter commented 9 years ago
Hi,

i just upgraded to  glibc 2.5.1 from source tarballs and now when i try to make 
lsyncd i get following errors :

-----------------------------------------------------

BigBang:~/downloads/lsyncd-2.0.4 # make
make  all-am
make[1]: Entering directory `/root/downloads/lsyncd-2.0.4'
gcc -DHAVE_CONFIG_H -I.     -g -O2 -Wall -I 
/root/downloads/essentials/lua-5.1.4/src/ -MT lsyncd.o -MD -MP -MF 
.deps/lsyncd.Tpo -c -o lsyncd.o lsyncd.c
lsyncd.c: In function âmain1â:
lsyncd.c:1562: warning: âalarm_timeâ may be used uninitialized in this 
function
lsyncd.c:1560: warning: âforce_alarmâ may be used uninitialized in this 
function
mv -f .deps/lsyncd.Tpo .deps/lsyncd.Po
gcc -DHAVE_CONFIG_H -I.     -g -O2 -Wall -I 
/root/downloads/essentials/lua-5.1.4/src/ -MT inotify.o -MD -MP -MF 
.deps/inotify.Tpo -c -o inotify.o inotify.c
mv -f .deps/inotify.Tpo .deps/inotify.Po
objcopy --input-target=binary \
--output-target=`cat objtarget` \
        --binary-architecture=`cat objarch` luac.out luac.o
gcc  -g -O2 -Wall -I /root/downloads/essentials/lua-5.1.4/src/   -o lsyncd 
lsyncd.o inotify.o /root/downloads/essentials/lua-5.1.4/src/liblua.a luac.o
/root/downloads/essentials/lua-5.1.4/src/liblua.a(lvm.o): In function `Arith':
lvm.c:(.text+0xc1c): undefined reference to `floor'
lvm.c:(.text+0xc7d): undefined reference to `pow'
/root/downloads/essentials/lua-5.1.4/src/liblua.a(lvm.o): In function 
`luaV_execute':
lvm.c:(.text+0x21ee): undefined reference to `floor'
lvm.c:(.text+0x2220): undefined reference to `pow'
/root/downloads/essentials/lua-5.1.4/src/liblua.a(lcode.o): In function 
`codearith':
lcode.c:(.text+0x10d4): undefined reference to `floor'
lcode.c:(.text+0x1137): undefined reference to `pow'
/root/downloads/essentials/lua-5.1.4/src/liblua.a(lmathlib.o): In function 
`math_tan':
lmathlib.c:(.text+0x12f): undefined reference to `tan'
/root/downloads/essentials/lua-5.1.4/src/liblua.a(lmathlib.o): In function 
`math_tanh':
lmathlib.c:(.text+0x15f): undefined reference to `tanh'
/root/downloads/essentials/lua-5.1.4/src/liblua.a(lmathlib.o): In function 
`math_sqrt':
lmathlib.c:(.text+0x1a3): undefined reference to `sqrt'
/root/downloads/essentials/lua-5.1.4/src/liblua.a(lmathlib.o): In function 
`math_sin':
lmathlib.c:(.text+0x1cf): undefined reference to `sin'
/root/downloads/essentials/lua-5.1.4/src/liblua.a(lmathlib.o): In function 
`math_sinh':
lmathlib.c:(.text+0x1ff): undefined reference to `sinh'
/root/downloads/essentials/lua-5.1.4/src/liblua.a(lmathlib.o): In function 
`math_floor':
lmathlib.c:(.text+0x32f): undefined reference to `floor'
/root/downloads/essentials/lua-5.1.4/src/liblua.a(lmathlib.o): In function 
`math_random':
lmathlib.c:(.text+0x426): undefined reference to `floor'
lmathlib.c:(.text+0x475): undefined reference to `floor'
/root/downloads/essentials/lua-5.1.4/src/liblua.a(lmathlib.o): In function 
`math_pow':
lmathlib.c:(.text+0x4fb): undefined reference to `pow'
/root/downloads/essentials/lua-5.1.4/src/liblua.a(lmathlib.o): In function 
`math_log':
lmathlib.c:(.text+0x59f): undefined reference to `log'
/root/downloads/essentials/lua-5.1.4/src/liblua.a(lmathlib.o): In function 
`math_log10':
lmathlib.c:(.text+0x5cf): undefined reference to `log10'
/root/downloads/essentials/lua-5.1.4/src/liblua.a(lmathlib.o): In function 
`math_fmod':
lmathlib.c:(.text+0x6bb): undefined reference to `fmod'
/root/downloads/essentials/lua-5.1.4/src/liblua.a(lmathlib.o): In function 
`math_exp':
lmathlib.c:(.text+0x6ef): undefined reference to `exp'
/root/downloads/essentials/lua-5.1.4/src/liblua.a(lmathlib.o): In function 
`math_cos':
lmathlib.c:(.text+0x71f): undefined reference to `cos'
/root/downloads/essentials/lua-5.1.4/src/liblua.a(lmathlib.o): In function 
`math_cosh':
lmathlib.c:(.text+0x74f): undefined reference to `cosh'
/root/downloads/essentials/lua-5.1.4/src/liblua.a(lmathlib.o): In function 
`math_ceil':
lmathlib.c:(.text+0x77f): undefined reference to `ceil'
/root/downloads/essentials/lua-5.1.4/src/liblua.a(lmathlib.o): In function 
`math_atan':
lmathlib.c:(.text+0x7af): undefined reference to `atan'
/root/downloads/essentials/lua-5.1.4/src/liblua.a(lmathlib.o): In function 
`math_atan2':
lmathlib.c:(.text+0x80b): undefined reference to `atan2'
/root/downloads/essentials/lua-5.1.4/src/liblua.a(lmathlib.o): In function 
`math_asin':
lmathlib.c:(.text+0x83f): undefined reference to `asin'
/root/downloads/essentials/lua-5.1.4/src/liblua.a(lmathlib.o): In function 
`math_acos':
lmathlib.c:(.text+0x86f): undefined reference to `acos'
/root/downloads/essentials/lua-5.1.4/src/liblua.a(loadlib.o): In function 
`ll_loadfunc':
loadlib.c:(.text+0x7d4): undefined reference to `dlsym'
loadlib.c:(.text+0x7e2): undefined reference to `dlerror'
loadlib.c:(.text+0x8ad): undefined reference to `dlopen'
loadlib.c:(.text+0x8c3): undefined reference to `dlerror'
/root/downloads/essentials/lua-5.1.4/src/liblua.a(loadlib.o): In function 
`gctm':
loadlib.c:(.text+0xdbc): undefined reference to `dlclose'
collect2: ld returned 1 exit status
make[1]: *** [lsyncd] Error 1
make[1]: Leaving directory `/root/downloads/lsyncd-2.0.4'
make: *** [all] Error 2
-------------------------------------------------------------------------------

Is this beacuse , gcc is not linked to new glibc ? how could that be achieved. 
Struck will lsyncd for major part of my day yet ! :(

Thnks for all incoming help. 

Original comment by thevi...@gmail.com on 22 Jun 2011 at 9:50

GoogleCodeExporter commented 9 years ago
This is all not a Lsyncd issue, but trying to get a new software run on an old 
system.

You are missing the math library (-lm) and dynamic load library (-ldl) Be sure 
that gcc links to he correct binary of glibc! But thats again not an issue of 
lsync.

Original comment by axk...@gmail.com on 22 Jun 2011 at 9:58

GoogleCodeExporter commented 9 years ago
Huh, yes yes i do understand i am getting to run lsyncd on a obselete system.
But may i know how to link gcc to correct binary of glibc ? i know its way out 
of scope of the forum, but would highly appreciate if could help me resolve it 
too..

Original comment by thevi...@gmail.com on 22 Jun 2011 at 10:09

GoogleCodeExporter commented 9 years ago
I'm really not an expert for that :-(

Original comment by axk...@gmail.com on 22 Jun 2011 at 10:15

GoogleCodeExporter commented 9 years ago

Original comment by axk...@gmail.com on 6 Jul 2011 at 6:03

GoogleCodeExporter commented 9 years ago
I got past this problem on Ubuntu 11.04 by editing the lsyncd Makefile and 
adding -ldl -lm to CFLAGS:

CFLAGS = -ldl -lm -g -O2 -Wall $(LUA_CFLAGS)

Original comment by glo...@gmail.com on 13 Jul 2011 at 7:37

GoogleCodeExporter commented 9 years ago
Wow Thanks ! i had to install a new version of gcc alongside old
version.Then i pointed the gcc to new glib with flags. Thats how i installed
it after compilation. Will try this one too ;)

Original comment by thevi...@gmail.com on 14 Jul 2011 at 4:43