Closed GoogleCodeExporter closed 9 years ago
Hi!
first configuring with --with-runner=/usr/local/share/ will workaround this
problem, as in that case the part of Lsyncd written in Lua will be placed as
text file there instead of compiling it into the binary - which causes the
problem here.
For fixing this, can you please post the results of these commands in your
lsyncd directory?
gcc -dumpmachine
objdump -f lsyncd.o | grep architecture
objdump -f lsyncd.o | grep architecture | sed -e "s/,.*$$//" -e "s/[^ ]*
\(.*\)/\1/"
cat architecture
Original comment by axk...@gmail.com
on 17 Nov 2010 at 12:50
okay, i found one issue with the architecture and fixed it in svn for a start.
Original comment by axk...@gmail.com
on 17 Nov 2010 at 1:00
1st
x86_64-redhat-linux
architecture: i386:x86-64, flags 0x00000011:
i386:x86-64, flags 0x00000011:
{blank}
2nd
with svn rev 371
.. svn]# chmod +x autogen.sh
... svn]# ./autogen.sh
Generating configure files... may take a while.
configure.ac: installing `./install-sh'
configure.ac: installing `./missing'
Makefile.am: installing `./depcomp'
Preparing was successful if there was no error messages above.
Now type:
./configure && make
Run './configure --help' for more information
... svn]# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
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 ANSI C... 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/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LIBLUA... yes
checking how to run the C preprocessor... gcc -E
checking for egrep... 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
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
... svn]# make
make all-am
make[1]: Entering directory `/usr/src/svn'
luac lsyncd.lua
if gcc -DHAVE_CONFIG_H -I. -I. -I. -Wall -MT lsyncd.o -MD -MP -MF
".deps/lsyncd.Tpo" -c -o lsyncd.o lsyncd.c; \
then mv -f ".deps/lsyncd.Tpo" ".deps/lsyncd.Po"; else rm -f ".deps/lsyncd.Tpo"; exit 1; fi
objdump -f lsyncd.o | grep architecture | sed -e "s/,.*$//" -e "s/[^ ]*
\(.*\)/\1/" > architecture || rm architecture
objcopy --input-target=binary --output-target=`gcc -dumpmachine`
--binary-architecture=`cat architecture` luac.out luac.o
objcopy: luac.o: Invalid bfd target
make[1]: *** [luac.o] Error 1
make[1]: Leaving directory `/usr/src/svn'
make: *** [all] Error 2
... svn]#
thanks a lot but it failed again : architecture is empty (any dependency
missing ?)
Marc
Original comment by marc.s...@gmail.com
on 17 Nov 2010 at 1:18
rm architecture and try again. looking through the rest right now.
Original comment by axk...@gmail.com
on 17 Nov 2010 at 1:38
[deleted comment]
the problem is another tough, --output-target is in my case "i486-linux-gnu"
which identical to the output of gcc -dumpversion ... dunno why redhat put
anything "redhat in there".
Original comment by axk...@gmail.com
on 17 Nov 2010 at 1:44
okay, i fixed the target determination, can you please svn update, and try
again?
Original comment by axk...@gmail.com
on 17 Nov 2010 at 2:00
i tried the r373 release.
so :
./autogen OK
./configure OK
.make KO
[... svn]# make
make all-am
make[1]: Entering directory `/usr/src/svn'
luac lsyncd.lua
if gcc -DHAVE_CONFIG_H -I. -I. -I. -Wall -MT lsyncd.o -MD -MP -MF
".deps/lsyncd.Tpo" -c -o lsyncd.o lsyncd.c; \
then mv -f ".deps/lsyncd.Tpo" ".deps/lsyncd.Po"; else rm -f ".deps/lsyncd.Tpo"; exit 1; fi
objdump -f lsyncd.o | grep architecture | \
sed -e "s/,.*$//" -e "s/[^ ]* \(.*\)/\1/" > objarch || rm objarch
objdump -f lsyncd.o | grep "file format" | \
sed -e "s/.* \(.*\)/\1/" > objtarget || rm objtarget
objcopy --input-target=binary \
--output-target=`cat objtarget` \
--binary-architecture=`cat objarch` luac.out luac.o
gcc -Wall lsyncd.c luac.o /usr/lib64/liblua.so /usr/lib/libm.so -o lsyncd
/usr/lib/libm.so: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make[1]: *** [lsyncd] Error 1
make[1]: Leaving directory `/usr/src/svn'
make: *** [all] Error 2
[... svn]#
gcc -Wall lsyncd.c luac.o /usr/lib64/liblua.so /usr/lib64/libm.so -o
lsyncd
if I modify gcc line :
[root@a82sa2 svn]# gcc -Wall lsyncd.c luac.o /usr/lib64/liblua.so
/usr/lib64/libm.so -o lsyncd
/usr/lib64/liblua.so: undefined reference to `dlsym'
/usr/lib64/liblua.so: undefined reference to `dlerror'
/usr/lib64/liblua.so: undefined reference to `dlopen'
/usr/lib64/liblua.so: undefined reference to `dlclose'
collect2: ld returned 1 exit status
[root@a82sa2 svn]#
best regards
Marc
Original comment by marc.s...@gmail.com
on 17 Nov 2010 at 2:57
so translating lsyncd.lua into an object format worked now :-)
strange missing dependency, and configure getting you the wrong math library.
Maybe libltdl defines these references for you?
Original comment by axk...@gmail.com
on 17 Nov 2010 at 3:08
:-) i did't solve the probleme
same problem with lua compiled or in binary package (5.1.4)
every thing seem's ok
Is redhat 5.3 too old (libc 2.5?)
# ldd /usr/lib64/liblua.so
libc.so.6 => /lib64/libc.so.6 (0x00002b123b339000)
/lib64/ld-linux-x86-64.so.2 (0x0000003639400000)
# ls -la /lib64/ld-linux-x86-64.so.2
lrwxrwxrwx 1 root root 9 Oct 8 15:50 /lib64/ld-linux-x86-64.so.2 -> ld-2.5.so
# ls -la /lib64/libc.so.6
lrwxrwxrwx 1 root root 11 Oct 8 15:50 /lib64/libc.so.6 -> libc-2.5.so
more help needed ...
thanks a lot
Marc
Original comment by marc.s...@gmail.com
on 18 Nov 2010 at 4:36
still getting undefined reference to `dlopen'?
Lsyncd actually doesnt reference it itself, it is referenced by Lua tough to
dynmically load modules. Can you maybe ./configure && make stock lua-5.1
yourself and post the logs?
Original comment by axk...@gmail.com
on 19 Nov 2010 at 10:40
So, from a stock lua source (5.1.4)
I compiled lua from /usr/src/lua5.1.4 directory.
all test are ok (lua and luac)
for exemple : (from test directory)
# lua env.lua
nil root
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
cp /usr/src/lua-5.1.4/etc/lua.pc /usr/lib64/pkgconfig/
and modified
configure.ac:PKG_CHECK_MODULES(LIBLUA, lua5.1)
to
configure.ac:PKG_CHECK_MODULES(LIBLUA, lua)
because of error (pkg-config/lua5.1 not found)
# chmod +x ./autogen.sh
# ./autogen.sh
Generating configure files... may take a while.
configure.ac: installing `./install-sh'
configure.ac: installing `./missing'
Makefile.am: installing `./depcomp'
Preparing was successful if there was no error messages above.
Now type:
./configure && make
Run './configure --help' for more information
# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
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 ANSI C... 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/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LIBLUA... yes
checking how to run the C preprocessor... gcc -E
checking for egrep... 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
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
# make
make all-am
make[1]: Entering directory `/usr/src/svn'
luac lsyncd.lua
if gcc -DHAVE_CONFIG_H -I. -I. -I. -Wall -I/usr/local/include -MT
lsyncd.o -MD -MP -MF ".deps/lsyncd.Tpo" -c -o lsyncd.o lsyncd.c; \
then mv -f ".deps/lsyncd.Tpo" ".deps/lsyncd.Po"; else rm -f ".deps/lsyncd.Tpo"; exit 1; fi
objdump -f lsyncd.o | grep architecture | \
sed -e "s/,.*$//" -e "s/[^ ]* \(.*\)/\1/" > objarch || rm objarch
objdump -f lsyncd.o | grep "file format" | \
sed -e "s/.* \(.*\)/\1/" > objtarget || rm objtarget
objcopy --input-target=binary \
--output-target=`cat objtarget` \
--binary-architecture=`cat objarch` luac.out luac.o
make[1]: *** No rule to make target `-L/usr/local/lib', needed by `lsyncd'.
Stop.
make[1]: Leaving directory `/usr/src/svn'
make: *** [all] Error 2
#
Do you need something else?
cat lua.pc
# lua.pc -- pkg-config data for Lua
# vars from install Makefile
# grep '^V=' ../Makefile
V= 5.1
# grep '^R=' ../Makefile
R= 5.1.4
# grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/'
prefix= /usr/local
INSTALL_BIN= ${prefix}/bin
INSTALL_INC= ${prefix}/include
INSTALL_LIB= ${prefix}/lib
INSTALL_MAN= ${prefix}/man/man1
INSTALL_LMOD= ${prefix}/share/lua/${V}
INSTALL_CMOD= ${prefix}/lib/lua/${V}
# canonical vars
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: Lua
Description: An Extensible Extension Language
Version: ${R}
Requires:
Libs: -L${libdir} -llua -lm
Cflags: -I${includedir}
# (end of lua.pc)
Best regards
Marc
Original comment by marc.s...@gmail.com
on 22 Nov 2010 at 3:30
i've forgot
lsyncd2 sources version : r404 : last release today
Marc
Original comment by marc.s...@gmail.com
on 22 Nov 2010 at 3:36
I suppose the automake variable $(LIBLUA_LIBS) is garbadged. The only reason
why I can imagine make could think it would need to build "/usr/local/lib", in
my case it is "-llua5.1"
You can try following change in Makefile.am
--- replace ---
lsyncd: luac.o $(lsyncd_LDADD)
--with--
lsyncd_LDADD += luac.o
----
IMHO thats better,
Sorry I'm still fighting with automake ;-)
Original comment by axk...@gmail.com
on 22 Nov 2010 at 4:48
ok.
so with the last version (r407) it's working (yeah!)
with
LIBLUA_LIBS = -L/usr/local/lib -llua -lm -ldl
instead of
LIBLUA_LIBS = -L/usr/local/lib -llua -lm
in the Makefile
Thanks a lot for this so interesting tool.
Best regards
Marc
Original comment by marc.s...@gmail.com
on 23 Nov 2010 at 8:25
still remaining is the probleme :
lua5.1.pc is requested by lsyncd compilation instead of
lua.pc (provided by lua5.1.4 sources)
error :
./configure
...
checking for LIBLUA... configure: error: Package requirements (lua5.1) were not
met:
No package 'lua5.1' found
to solve :
cp /usr/src/svn/etc/lua.pc /usr/lib64/pkgconfig/lua5.1.pc
vi /usr/lib64/pkgconfig/lua5.1.pc (Libs: ...) :
# lua.pc -- pkg-config data for Lua
# vars from install Makefile
# grep '^V=' ../Makefile
V= 5.1
# grep '^R=' ../Makefile
R= 5.1.4
# grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/'
prefix= /usr/local
INSTALL_BIN= ${prefix}/bin
INSTALL_INC= ${prefix}/include
INSTALL_LIB= ${prefix}/lib
INSTALL_MAN= ${prefix}/man/man1
INSTALL_LMOD= ${prefix}/share/lua/${V}
INSTALL_CMOD= ${prefix}/lib/lua/${V}
# canonical vars
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: Lua
Description: An Extensible Extension Language
Version: ${R}
Requires:
Libs: -L${libdir} -llua -lm -ldl
Cflags: -I${includedir}
# (end of lua.pc)
Original comment by marc.s...@gmail.com
on 23 Nov 2010 at 9:37
New test with r445
Compilation ok on RHEL 5.3 x86_64:
Dependencies on Redhat 5.3 : asciidoc not provided by RH
(coming from
ftp.freshrpms.net/pub/freshrpms/pub/dag/redhat/el5/en/x86_64/dag/RPMS/asciidoc-8
.6.3-1.el5.rf.noarch.rpm )
1 warning if no connection to the net :
...
I/O error : Attempt to load network entity
http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd
doc/lsyncd.1.xml:2: warning: failed to load external entity
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
D DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
^
Writing lsyncd.1 for refentry
make[1]: Leaving directory `/usr/src/svn'
1 testfile execution problem :
pwd ; lsyncd /doc/lsyncd/lrsync.lua
/home/testlsyncd
src is relative path (to where lsyncd is launched): /home/testlsyncd/src
trg is absolute path : /trg
with lbash
old errr come back :
Every 1.0s: tree -L... Mon Nov 29 12:32:41 2010
/home/testlsyncd/trg/
`-- a
`-- b
|-- b
| `-- c
| `-- d
| `-- e
| `-- f
`-- c
|-- c
| `-- d
| `-- e
| `-- f
`-- d
|-- d
| `-- e
| `-- f
`-- e
|-- e
| `-- f
`-- f
`-- f
21 directories, 0 files
yours sincerely
would you prefer an another channel for testing report ?
Marc
Original comment by marc.s...@gmail.com
on 29 Nov 2010 at 11:34
I fixed the lbash example hopefully for good :-)
About the manpage compilation, I dont know why it fails for you, manpages will
be pre"compiled" on .tar.gz releases tough.
I gladly accept your testing reports on any channel I can get! :-) Otherwise
you might want to prefer the discussion group also.
BTW: Did you noticed how I advanced lua package detection? Should now work with
several distro naming schemes.
Original comment by axk...@gmail.com
on 29 Nov 2010 at 1:11
Yes i noticed it. thanks you about your immediate reply. remaining is the
'-ldl' option needed in the 'lua.pc' definition
about manpage i found the problem.
Add '--novalid' option to xsltproc line in "Makefile.am" . He will not try to
load the dtd page.
so the line is :
doc/lsyncd.1: doc/lsyncd.1.xml
xsltproc --novalid --nonet -o $@ /etc/asciidoc/docbook-xsl/manpage.xsl $<
in Makefile.am
Marc
Original comment by marc.s...@gmail.com
on 29 Nov 2010 at 2:35
i'm working from svn ... that's why i didn't get the correct manpages...
Marc
Original comment by marc.s...@gmail.com
on 29 Nov 2010 at 2:48
so the last release is : r448
and the compilation show :
# /bin/sh autogen.sh .... OK
# ./configure ........... OK
# make ...................NOK
make all-am
make[1]: Entering directory `/usr/src/svn'
if gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -Wall -I/usr/local/include -MT
lsyncd.o -MD -MP -MF ".deps/lsyncd.Tpo" -c -o lsyncd.o lsyncd.c; \
then mv -f ".deps/lsyncd.Tpo" ".deps/lsyncd.Po"; else rm -f ".deps/lsyncd.Tpo"; exit 1; fi
lsyncd.c: In function ‘main1’:
################
lsyncd.c:1217: warning: ‘alarm_time’ may be used uninitialized in this
function
################
if gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -Wall -I/usr/local/include -MT
inotify.o -MD -MP -MF ".deps/inotify.Tpo" -c -o inotify.o inotify.c; \
then mv -f ".deps/inotify.Tpo" ".deps/inotify.Po"; else rm -f ".deps/inotify.Tpo"; exit 1; fi
inotify.c: In function ‘l_addwatch’:
##################################
inotify.c:75: warning: format ‘%d’ expects type ‘int’, but argument 6
has type ‘lua_Integer’
###################################
inotify.c: In function ‘l_rmwatch’:
inotify.c:91: warning: format ‘%d’ expects type ‘int’, but argument 5
has type ‘lua_Integer’
################################
luac lsyncd.lua
objdump -f lsyncd.o | grep architecture | \
sed -e "s/,.*$//" -e "s/[^ ]* \(.*\)/\1/" > objarch || rm objarch
objdump -f lsyncd.o | grep "file format" | \
sed -e "s/.* \(.*\)/\1/" > objtarget || rm objtarget
objcopy --input-target=binary \
--output-target=`cat objtarget` \
--binary-architecture=`cat objarch` luac.out luac.o
gcc -g -O2 -Wall -I/usr/local/include -o lsyncd lsyncd.o inotify.o
-L/usr/local/lib -llua -ldl -lm luac.o
asciidoc -o doc/lsyncd.1.xml -b docbook -d manpage doc/lsyncd.1.txt
##########
xsltproc --novalid --nonet -o doc/lsyncd.1
/etc/asciidoc/docbook-xsl/manpage.xsl doc/lsyncd.1.xml
##########
Writing lsyncd.1 for refentry
make[1]: Leaving directory `/usr/src/svn'
# make install ..... OK
Marc
Original comment by marc.s...@gmail.com
on 29 Nov 2010 at 3:13
as of r445, r448 failed in lbash.lua test .
:-(
Original comment by marc.s...@gmail.com
on 29 Nov 2010 at 3:24
yes, thats cool, since of course nothing thats being processed should go into
the svn.
I changed Makefile.am so it correctly inherits the CFLAGS from configure, so in
your case you could run:
CFLAGS=-ldl ./configure
I'm just working on a MAC and I cannot get it to create the manpages either :-)
Original comment by axk...@gmail.com
on 29 Nov 2010 at 3:27
I was refering to comment 20, looking at the stuff.
Original comment by axk...@gmail.com
on 29 Nov 2010 at 3:37
Can you look at it again with latest version?
Original comment by axk...@gmail.com
on 29 Nov 2010 at 4:41
so for r454
with
CFLAGS=-ldl ./configure
and
Makefile.am : xsltproc --novalid --nonet -o doc/lsyncd.1 ...
autogen ......OK
./configure ..OK
make .........OK
make install .OK
lsyncd -log all -delay 1 /doc/lsyncd/lbash.lua.... OK :-))
Marc
Original comment by marc.s...@gmail.com
on 30 Nov 2010 at 8:44
Wayho! Looks like we are finally nearing the release. Actual content
in the manpage, maybe finishup fsevents and off it goes.
Original comment by axk...@gmail.com
on 30 Nov 2010 at 9:35
I'm closing this one, if you find new things please open a new issue :-)
Original comment by axk...@gmail.com
on 4 Dec 2010 at 9:04
Original issue reported on code.google.com by
marc.s...@gmail.com
on 17 Nov 2010 at 12:36