ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
When I do a make , while building asterisk 1.4 I get this error
Quote:
[AR] hash/hash.o hash/hash_bigkey.o hash/hash_buf.o hash/hash_func.o hash/hash_log2.o hash/hash_page.o hash/ndbm.o btree/bt_close.o btree/bt_conv.o btree/bt_debug.o btree/bt_delete.o btree/bt_get.o btree/bt_open.o btree/bt_overflow.o btree/bt_page.o btree/bt_put.o bt ree/bt_search.o btree/bt_seq.o btree/bt_split.o btree/bt_utils.o db/db.o mpool/mpool.o recno/rec_close.o recno/rec_delete.o recno/rec_g et.o recno/rec_open.o recno/rec_put.o recno/rec_search.o recno/rec_seq.o recno/rec_utils.o -> libdb1.a
[LD] abstract_jb.o acl.o aescrypt.o aeskey.o aestab.o alaw.o app.o ast_expr2.o ast_expr2f.o asterisk.o astmm.o astobj2.o audiohook.o autoservice.o callerid.o cdr.o channel.o chanvars.o cli.o config.o cryptostub.o db.o devicestate.o dial.o dns.o dnsmgr.o dsp.o enum.o file.o fixedjitterbuf.o frame.o fskmodem.o global_datastores.o http.o image.o indications.o io.o jitterbuf.o loader.o logger.o manager. o md5.o netsock.o pbx.o plc.o privacy.o rtp.o say.o sched.o sha1.o slinfactory.o srv.o stdtime/localtime.o strcompat.o tdd.o term.o thr eadstorage.o translate.o udptl.o ulaw.o utils.o editline/libedit.a db1-ast/libdb1.a ../apps/modules.link ../cdr/modules.link ../channel s/modules.link ../codecs/modules.link ../formats/modules.link ../funcs/modules.link ../pbx/modules.link ../res/modules.link -> asterisk
loader.o: In function `load_dynamic_module':
/usr/src/asterisk/main/loader.c:362: warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
asterisk.o: In function `main':
/usr/src/asterisk/main/asterisk.c:2828: warning: Using 'initgroups' in statically linked applications requires at runtime the shared li braries from the glibc version used for linking
asterisk.o: In function `ast_makesocket':
/usr/src/asterisk/main/asterisk.c:1089: warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libr aries from the glibc version used for linking
editline/libedit.a(readline.o_a): In function `username_completion_function':
/usr/src/asterisk/main/editline/readline.c:1296: warning: Using 'getpwent' in statically linked applications requires at runtime the sh ared libraries from the glibc version used for linking
asterisk.o: In function `ast_makesocket':
/usr/src/asterisk/main/asterisk.c:1080: warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libr aries from the glibc version used for linking
editline/libedit.a(readline.o_a): In function `username_completion_function':
/usr/src/asterisk/main/editline/readline.c:1294: warning: Using 'setpwent' in statically linked applications requires at runtime the sh ared libraries from the glibc version used for linking
/usr/src/asterisk/main/editline/readline.c:1300: warning: Using 'endpwent' in statically linked applications requires at runtime the sh ared libraries from the glibc version used for linking
utils.o: In function `ast_gethostbyname':
/usr/src/asterisk/main/utils.c:223: warning: Using 'gethostbyname_r' in statically linked applications requires at runtime the shared l ibraries from the glibc version used for linking
manager.o: In function `accept_thread':
/usr/src/asterisk/main/manager.c:2406: warning: Using 'getprotobyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_func':
(.text+0x2d6): undefined reference to `dlsym'
/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_var':
(.text+0x446): undefined reference to `dlsym'
collect2: ld returned 1 exit status
make[1]: *** [asterisk] Error 1
make: *** [main] Error 2
Who's program is it? They need to add -ldl to the linker line, for one. In general, it seems that all of the warnings state that certain parts of glibc can't be statically linked on your system. Who's choice was it to link statically? If it was yours, try again using the default configuration. If not, ask someone at the project why they need to statically link.
On a side note, normally the first place to ask for this sort of help would be the developer. We can try to help, but they know their code best and it might be a bug that they need to fix.
ta0kira
Actually I tried to get resolved in their forum, but didn't get much help. Actually this seems to be a generic error, thats why I posted it here.
I tried to use LD_FLAGS=-ldl ./configure and did make, but got the same error.
How to check whether glibc is correctly compiled in my system is there any way to do it?
and I I need to statically link the libs , how to do it for this purpose...
I'd email the developers directly. If it doesn't get resolved, I'd look for another project. "Open-source" doesn't mean "troubleshoot project shortcomings," after all. If it's a non-standard build, please let us know, otherwise I think you need to knock down the door of the developers. As a developer myself, I'd much rather someone with problems emailed me directly.
ta0kira
PS You rarely need to recompile glibc, and in fact it is only rarely compiled incorrectly in an established distro. Generally the project is considered in the wrong unless they require specific features of glibc dependent on specific versions, but that's what autoconf is supposed to take care of (i.e. ./configure.) Also, try placing the word export before LD_FLAGS=-ldl ./configure, but make sure youmake distclean first.
ta0kira , I tried the steps what you mentioned, when I did an export before LD_FLAGS=-ldl ./configure , it shows "bash: export: `./configure': not a valid identifier"
Actually I got the stable version of this software, and this one is the latest version. I got the older version which works without any issues. http://www.asterisk.org/ . http://forums.digium.com.
I have been trying to resolve it for the past 5 days but not able to do it. I'm just wondering is it a issues with i386 / i686 version of glibc which gets messed up when I compile this software?
I faced similar problem with compiling ntpd under arm platform . I hope below information may help you .
This is not a solution and is only a workaround .
In my case , i don't need any crypting job . So i excluded the library while configuring .
You can do this omission ,by looking into configure file .
In ntpd . I changed the line below
********************************************************
*) # Look for libcrypto.a and libssl.a:
for i in $ans no
do
case "$host" in
*-*-darwin*)
test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break
;;
*)
test -f $i/libcrypto.so -a -f $i/libssl.so && break
test -f $i/libcrypto.a -a -f $i/libssl.a && break
;;
esac
done
case "$i" in
no)
ans=no
OPENSSL_LIB=
;;
*) ans=no
OPENSSL_LIB=
;;
esac
***************************************************
Look into the configure file in ntp package . I have changd lines in red . So configure wont be able to find it and wont compile th cryptlibrary .. .
Thank you 91change , ta0kira and j-ray.
Actually I did a make without "make menuselect" and built it without additional components (which is not good).
but atleast, I'm able to install the default package. Now its bit hard for me to enable few features in that application. But will try to get those resolved with the developers itself.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.