Comments (28)
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 [email protected]
on 17 Nov 2010 at 12:50
from lsyncd.
okay, i found one issue with the architecture and fixed it in svn for a start.
Original comment by [email protected]
on 17 Nov 2010 at 1:00
from lsyncd.
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 [email protected]
on 17 Nov 2010 at 1:18
from lsyncd.
rm architecture and try again. looking through the rest right now.
Original comment by [email protected]
on 17 Nov 2010 at 1:38
from lsyncd.
[deleted comment]
from lsyncd.
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 [email protected]
on 17 Nov 2010 at 1:44
from lsyncd.
okay, i fixed the target determination, can you please svn update, and try
again?
Original comment by [email protected]
on 17 Nov 2010 at 2:00
from lsyncd.
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 [email protected]
on 17 Nov 2010 at 2:57
from lsyncd.
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 [email protected]
on 17 Nov 2010 at 3:08
from lsyncd.
:-) 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 [email protected]
on 18 Nov 2010 at 4:36
from lsyncd.
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 [email protected]
on 19 Nov 2010 at 10:40
from lsyncd.
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 [email protected]
on 22 Nov 2010 at 3:30
from lsyncd.
i've forgot
lsyncd2 sources version : r404 : last release today
Marc
Original comment by [email protected]
on 22 Nov 2010 at 3:36
from lsyncd.
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 [email protected]
on 22 Nov 2010 at 4:48
from lsyncd.
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 [email protected]
on 23 Nov 2010 at 8:25
from lsyncd.
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 [email protected]
on 23 Nov 2010 at 9:37
from lsyncd.
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 [email protected]
on 29 Nov 2010 at 11:34
from lsyncd.
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 [email protected]
on 29 Nov 2010 at 1:11
from lsyncd.
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 [email protected]
on 29 Nov 2010 at 2:35
from lsyncd.
i'm working from svn ... that's why i didn't get the correct manpages...
Marc
Original comment by [email protected]
on 29 Nov 2010 at 2:48
from lsyncd.
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 [email protected]
on 29 Nov 2010 at 3:13
from lsyncd.
as of r445, r448 failed in lbash.lua test .
:-(
Original comment by [email protected]
on 29 Nov 2010 at 3:24
from lsyncd.
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 [email protected]
on 29 Nov 2010 at 3:27
from lsyncd.
I was refering to comment 20, looking at the stuff.
Original comment by [email protected]
on 29 Nov 2010 at 3:37
from lsyncd.
Can you look at it again with latest version?
Original comment by [email protected]
on 29 Nov 2010 at 4:41
from lsyncd.
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 [email protected]
on 30 Nov 2010 at 8:44
from lsyncd.
Wayho! Looks like we are finally nearing the release. Actual content
in the manpage, maybe finishup fsevents and off it goes.
Original comment by [email protected]
on 30 Nov 2010 at 9:35
from lsyncd.
I'm closing this one, if you find new things please open a new issue :-)
Original comment by [email protected]
on 4 Dec 2010 at 9:04
- Changed state: Fixed
from lsyncd.
Related Issues (20)
- lsyncd spinning 100% CPU, writing "Normal: waiting for 1 more child processes" indefinitely to the log HOT 5
- Why only -lts option as argument to rsync HOT 5
- rsyncOps in documentation should be rsyncOpts HOT 4
- lsyncd crashes when it gets a notification from kernel HOT 2
- maxDelays doesn't seem to work HOT 6
- initial sync is too agressive HOT 1
- Documentation HOT 6
- rsyncOpts should be able to override "--delete" too HOT 3
- Ubuntu installation ./configure finding lua HOT 1
- lsyncd on arm system not finding getConfig() HOT 2
- lsync dies after initial sync HOT 18
- Compilation Errors on Solaris 11 Express HOT 2
- lsyncd ignores "--filter" command in rsyncOpts for rsyncssh (and maybe rsync) HOT 3
- Thousands of log messages: "Normal: waiting for 1 more child processes." HOT 4
- User and Group ownership not preserved HOT 4
- Bi-directional sync (possibly with unison?) HOT 3
- ERROR: Connection to remote host failed. HOT 2
- Treat rsync exit code 13 as temporary problem HOT 1
- tried to implement the group permission example using octal notation instead of "g+rw", lsyncd status immediately becomes: lsyncd dead but pid file exists HOT 5
- Fails to make on FreeBSD 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lsyncd.