This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Error 127

General support and discussion of Eggdrop bots.
Post Reply
k
kris0089
Voice
Posts: 1
Joined: Sat Jan 26, 2008 6:37 pm

Error 127

Post by kris0089 »

Hello, im installing eggdrop (Current version), and on installation i have recieved a error, a tad annoying as i have installed eggdrops before.

My Os is: Knoppix v5.1.17, HDD installation (So basicly debian)

my error:

All modules compiled.
make[1]: Leaving directory `/home/NoMansLand/eggdrop/eggdrop1.6.18/eggdrop1.6.18/src/mod'

Test run of ./eggdrop -v:
./eggdrop: error while loading shared libraries: libtcl8.5.so: cannot open shared object file: No such file or directory
make: *** [modules] Error 127
TCL is installed at /local/lib/tcl8 and local/lib/tcl8.5

Thank you

kris0089
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Seems your /etc/ld.so.conf needs to be set up properly and/or you need to run ldconfig.

Make sure there's a line reading /local/lib/tcl8.5 within your /etc/ld.so.conf file, and run ldconfig to update the database of loadable modules (must be run with root privs).
NML_375
User avatar
YooHoo
Owner
Posts: 939
Joined: Thu Feb 13, 2003 10:07 pm
Location: Redwood Coast

Post by YooHoo »

solution courtesy of johoho:

'./configure' is looking in the wrong place for Tcl; it looks like it compiled with one version of Tcl and tries to load another. Maybe your sysadmin upgraded Tcl and didn't tell you. In that case, you should just need to recompile your bot.

Or maybe when upgrading he didn't clean the old version of Tcl, and './configure' is looking for the files in the wrong places, or trying to use different versions of tcl.h and libtcl*. Smack your admin and have him install Tcl properly ;) Or try to:

./configure --with-tcllib=<path-to-tcl-lib> --with-tclinc=<path-to-tcl-inc>

Tell configure where to look for the Tcl files.

Try looking for libtcl by:
ls /usr/lib/libtcl*
ls /usr/local/lib/libtcl*

Try looking for tcl.h by:
ls /usr/include/*/tcl.h
ls /usr/local/include/*/tcl.h

If everything else fails, try to install Tcl to your home dir ;)
S
StarLion
Voice
Posts: 16
Joined: Tue Dec 20, 2005 6:15 pm

Post by StarLion »

I had this issue also... but found a resolution;

I assume most people have done the default install of TCL.
Copy your libtcl8.5.so file from /usr/local/lib/ to /lib/
Run ldconfig (mine was /sbin/ldconfig)
Retry the configure/make config/make process. Eggdrop should find the file.

(if this doesnt work for you, notice where your OS is pulling the other library files from when you do ldd eggdrop, and put the file there instead)
c
coldair
Voice
Posts: 3
Joined: Mon Feb 25, 2008 6:01 pm

Post by coldair »

Make sure there's a line reading /local/lib/tcl8.5 within your /etc/ld.so.conf file, and run ldconfig to update the database of loadable modules (must be run with root privs).
Great!
If I'll have root privs on that machine, there will be no problem.
Spent a lot of time trying to understand why linker/compiler ignores -I and -L params and --with-tcllib, --with-tclinc in configure.
strace ./eggdrop -v show us, that even if -I .... and -L.. was used correctly in compiling, eggdrop binary ignores that and wont search library in the defined path.

"
Linking eggdrop (standard build).

gcc -pipe -o ../eggdrop bg.o botcmd.o botmsg.o botnet.o chanprog.o cmds.o dcc.o dccutil.o dns.o flags.o language.o match.o main.o mem.o misc.o misc_file.o modules.o net.o rfc1459.o tcl.o tcldcc.o tclhash.o tclmisc.o tcluser.o userent.o userrec.o users.o -L/home/clients/websites/w_arsigr/opt/tcl/current/lib -ltcl8.5 -lm -ldl -lnsl md5/md5c.o compat/*.o `cat mod/mod.xlibs`
touch ../eggdrop

Successful compile: eggdrop
"

... but still 127:

"
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=13970, ...}) = 0
old_mmap(NULL, 13970, PROT_READ, MAP_PRIVATE, 3, 0) = 0x127000
close(3) = 0
open("/lib/tls/sse2/libtcl8.5.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/sse2", 0xbfffec64) = -1 ENOENT (No such file or directory)
open("/lib/tls/libtcl8.5.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/tls", 0xbfffec64) = -1 ENOENT (No such file or directory)
open("/lib/sse2/libtcl8.5.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/sse2", 0xbfffec64) = -1 ENOENT (No such file or directory)
open("/lib/libtcl8.5.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/lib/tls/sse2/libtcl8.5.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/tls/sse2", 0xbfffec64) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/libtcl8.5.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/tls", 0xbfffec64) = -1 ENOENT (No such file or directory)
open("/usr/lib/sse2/libtcl8.5.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/sse2", 0xbfffec64) = -1 ENOENT (No such file or directory)
open("/usr/lib/libtcl8.5.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib", {st_mode=S_IFDIR|0755, st_size=8192, ...}) = 0
writev(2, [{"./eggdrop", 9}, {": ", 2}, {"error while loading shared libra"..., 36}, {": ", 2}, {"libtcl8.5.so", 12}, {": ", 2}, {"cannot open shared object file", 30}, {": ", 2}, {"No such file or directory", 25}, {"\n", 1}], 10./eggdrop: error while loading shared libraries: libtcl8.5.so: cannot open shared object file: No such file or directory
) = 121
exit_group(127) = ?
Process 22023 detached
"
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

coldair: then either contact the admin to install tcl properly (ldconfig), or compile Tcl locally under your user account, making sure to configure it for static (disable-shared) build, and then rebuild your eggdrop as well, with configure pointing to where your Tcl library and header files reside, also configuring it to be a static build.
c
coldair
Voice
Posts: 3
Joined: Mon Feb 25, 2008 6:01 pm

Post by coldair »

strikelight wrote:coldair: then either contact the admin to install tcl properly (ldconfig), or compile Tcl locally under your user account, making sure to configure it for static (disable-shared) build, and then rebuild your eggdrop as well, with configure pointing to where your Tcl library and header files reside, also configuring it to be a static build.
Heh. As i've told already, i did exactly what u say. We have no tcl globally installed on the server, so I've made locally.
eggdrop still return with error 127 (look at strace output).

Fix me if i'm wrong, but enable-shared build of tcl or eggdrop have nothing to do with a problem i'm talking about.
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

coldair wrote:
strikelight wrote:coldair: then either contact the admin to install tcl properly (ldconfig), or compile Tcl locally under your user account, making sure to configure it for static (disable-shared) build, and then rebuild your eggdrop as well, with configure pointing to where your Tcl library and header files reside, also configuring it to be a static build.
Heh. As i've told already, i did exactly what u say. We have no tcl globally installed on the server, so I've made locally.
eggdrop still return with error 127 (look at strace output).

Fix me if i'm wrong, but enable-shared build of tcl or eggdrop have nothing to do with a problem i'm talking about.
Ok... You're wrong.
c
coldair
Voice
Posts: 3
Joined: Mon Feb 25, 2008 6:01 pm

Post by coldair »

strikelight wrote: Ok... You're wrong.
You've right :)
Static build solved a problem. probably i've missed something during my tries. Sorry for wasting your time.
Thanks for your help.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

If you did a local install, you'll have to set LD_LIBRARY_PATH environment variable to point to the location of your tcl-libraries whenever starting your eggie - should you link tcl dynamically. Of course, linking statically is always an option if you can live with the larger binaries.
NML_375
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Compiling statically linked binaries makes it include the lib in the binary.. Makes it much larger. I'd us the LD_LIBRARY_PATH var and compile it dynamically. Just FYI.
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

From the previous two comments you'd think it was producing a 100mb file, which it clearly does not. And if you want to compare advantages to disadvantages, you won't have to worry about security issues such as a comprimised shared module by using a static link. You also will be able to use the default botchk script with cron without any code modification, as you won't have to specify the LD_LIBRARY_PATH environment variable prior to every launch of eggdrop. Also more about the size, if you need to compile Tcl locally anyway, you are not losing any extra space, since that space would be occupied by the shared libraries as well, lol. "Just FYI".
Post Reply