syslog-ng 3.01 compilation error on Solaris
Hi, I was trying to compile the syslog-ng 3.01 on Solaris 10 Opteron machine using the mixed linking option. In the configure stage I get the below error complaining about the glib . I have compiled glib with teh enable static flag and the libglib-2.0.a library is available under the path /usr/local/lib and my PKG_CONFIG_PATH environment variable has been set correctly too. Please help me solve this. * * Below is the configure error. checking pthread.h usability... yes checking pthread.h presence... yes checking for pthread.h... yes checking for pthread_create in -lpthread... yes checking for LIBNET... no checking whether to enable Sun STREAMS support... yes checking whether to enable Sun door support... yes checking whether to enable TCP wrapper support... no checking whether to enable spoof source support... no checking whether to enable IPv6 support... yes checking whether to enable SQL support... no checking whether to enable Linux capability support... no checking whether to enable PCRE support... no checking for pkg-config... (cached) /usr/local/bin/pkg-config checking pkg-config is at least version 0.14... yes checking for GLIB - version >= 2.10.1... yes (version 2.16.5) checking for EVTLOG... yes checking for static GLib libraries... no checking sanity checking Glib headers... yes *configure: error: static GLib libraries not found (a file named libglib-2.0.a), either link GLib dynamically using the --enable-dynamic-linking or install a static GLib* * * * Thanks & Regards, Rakesh *
On Sat, 2011-02-19 at 22:23 +0530, Rakesh Rajasekharan wrote:
checking pthread.h usability... yes checking pthread.h presence... yes checking for pthread.h... yes checking for pthread_create in -lpthread... yes checking for LIBNET... no checking whether to enable Sun STREAMS support... yes checking whether to enable Sun door support... yes checking whether to enable TCP wrapper support... no checking whether to enable spoof source support... no checking whether to enable IPv6 support... yes checking whether to enable SQL support... no checking whether to enable Linux capability support... no checking whether to enable PCRE support... no checking for pkg-config... (cached) /usr/local/bin/pkg-config checking pkg-config is at least version 0.14... yes checking for GLIB - version >= 2.10.1... yes (version 2.16.5) checking for EVTLOG... yes checking for static GLib libraries... no checking sanity checking Glib headers... yes configure: error: static GLib libraries not found (a file named libglib-2.0.a), either link GLib dynamically using the --enable-dynamic-linking or install a static GLib
Could you take a look at config.log, and see the exact error message before the configure script errored out? (Or even better, if you can upload the config.log to some place, or paste it onto pastebin.com, that'd be even better) -- |8]
Hi, I have uploaded the config.log at paste bin hope you would receive that. Meanwhile, I just went through the config log and suspect that there seems to be issues findng the libivonv library file. I had directly taken the libiconv package and installed it using the pkgadd command. Would that not be enough or do I need to compile it manually. Or do you think there is something else apart from this.Please let me know. The below lines caused for the error it seems. 1. configure:8571: checking for static GLib libraries 2. configure:8605: gcc -o conftest -g -O2 -Wall -L/usr/local/lib -R/usr/local/lib conftest.c -Wl,-Bstatic -L/usr/local/lib -lglib-2.0 -lintl -liconv -Wl,-Bdynamic >&5 3. ld: fatal: library -liconv: not found 4. ld: fatal: File processing errors. No output written to conftest 5. collect2: ld returned 1 exit status 6. configure:8611: $? = 1 7. configure: failed program was: 8. | /* confdefs.h. */ 9. | #define PACKAGE_NAME "" 10. | #define PACKAGE_TARNAME "" 11. | #define PACKAGE_VERSION "" 12. | #define PACKAGE_STRING "" 13. | #define PACKAGE_BUGREPORT "" 14. | #define _FILE_OFFSET_BITS 64 15. | #define STDC_HEADERS 1 16. | #define HAVE_SYS_TYPES_H 1 17. | #define HAVE_SYS_STAT_H 1 18. | #define HAVE_STDLIB_H 1 19. | #define HAVE_STRING_H 1 20. | #define HAVE_MEMORY_H 1 21. | #define HAVE_STRINGS_H 1 22. | #define HAVE_INTTYPES_H 1 23. | #define HAVE_STDINT_H 1 24. | #define HAVE_UNISTD_H 1 25. | #define HAVE_STRINGS_H 1 26. | #define HAVE_GETOPT_H 1 27. | #define HAVE_STROPTS_H 1 28. | #define HAVE_SYS_STRLOG_H 1 29. | #define HAVE_DOOR_H 1 30. | #define HAVE_O_LARGEFILE 1 31. | #define HAVE_STRUCT_SOCKADDR_STORAGE 1 32. | #define HAVE_STRDUP 1 33. | #define HAVE_STRTOL 1 34. | #define HAVE_STRTOLL 1 35. | #define HAVE_STRTOIMAX 1 36. | #define HAVE_GETOPT_LONG 1 37. | #define HAVE_GETUTENT 1 38. | #define HAVE_PTHREAD_H 1 39. | #define HAVE_LIBPTHREAD 1 40. | /* end confdefs.h. */ 41. | 42. | extern void g_hash_table_new(void); 43. | 44. | int 45. | main () 46. | { 47. | 48. | 49. | void (*fn)(void) = g_hash_table_new; 50. | 51. | return (int) fn; 52. | 53. | 54. | ; 55. | return 0; 56. | } 57. configure:8628: result: no 58. configure:8635: checking sanity checking Glib headers 59. configure:8666: gcc -o conftest -g -O2 -Wall -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -L/usr/local/lib -R/usr/local/lib conftest.c -lpthread >&5 60. configure:8669: $? = 0 61. configure:8675: ./conftest 62. configure:8678: $? = 0 63. configure:8694: result: yes 64. configure:8789: error: static GLib libraries not found (a file named libglib-2.0.a), either link GLib dynamically using the --enable-dynamic-linking or install a static GLib Thanks & Regards, Rakesh On Sat, Feb 19, 2011 at 10:40 PM, Gergely Nagy <algernon@balabit.hu> wrote:
On Sat, 2011-02-19 at 22:23 +0530, Rakesh Rajasekharan wrote:
checking pthread.h usability... yes checking pthread.h presence... yes checking for pthread.h... yes checking for pthread_create in -lpthread... yes checking for LIBNET... no checking whether to enable Sun STREAMS support... yes checking whether to enable Sun door support... yes checking whether to enable TCP wrapper support... no checking whether to enable spoof source support... no checking whether to enable IPv6 support... yes checking whether to enable SQL support... no checking whether to enable Linux capability support... no checking whether to enable PCRE support... no checking for pkg-config... (cached) /usr/local/bin/pkg-config checking pkg-config is at least version 0.14... yes checking for GLIB - version >= 2.10.1... yes (version 2.16.5) checking for EVTLOG... yes checking for static GLib libraries... no checking sanity checking Glib headers... yes configure: error: static GLib libraries not found (a file named libglib-2.0.a), either link GLib dynamically using the --enable-dynamic-linking or install a static GLib
Could you take a look at config.log, and see the exact error message before the configure script errored out?
(Or even better, if you can upload the config.log to some place, or paste it onto pastebin.com, that'd be even better) -- |8]
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.campin.net/syslog-ng/faq.html
Hi! On Sun, 2011-02-20 at 00:19 +0530, Rakesh Rajasekharan wrote:
I have uploaded the config.log at paste bin hope you would receive that. Meanwhile, I just went through the config log and suspect that there seems to be issues findng the libivonv library file. I had directly taken the libiconv package and installed it using the pkgadd command. Would that not be enough or do I need to compile it manually.
I suspect that libiconv does not have a static library, yet, judging by the gcc comandline, gcc is trying to link it statically (along with libintl, but since it errored on iconv which comes later, I think libintl is fine). I'd check if it is, indeed, shared only (as in, there is no libiconv.a), and if so, compile one that has a static version aswell. Another option would be - if you're fine with linking libiconv dynamically - to find the pkg-config control file for glib (/usr/local/lib/pkgconfig/glib-2.0.pc or something similar), and remove libiconv from the Libs line there, and add it to the linked libraries some other way (for example, by exporting LDFLAGS=-liconv before running configure). I haven't tested this second workaround, so your might have to tweak a few things if you go this route. By the way: the newest version of syslog-ng from the 3.0.x series is 3.0.7, it might be worth going with that version instead, unless you need to stay with 3.0.1 for some reason. Hope this helps! -- |8]
Thanks Gergely... I went for 3.0.7 and as with 3.0.1 the same error existed here as well. Now as you suggested I build libiconv with the --enable-static ( in configure). and after which everything went perfectly fine. Best Regards, Rakesh On Sun, Feb 20, 2011 at 12:35 AM, Gergely Nagy <algernon@balabit.hu> wrote:
Hi!
On Sun, 2011-02-20 at 00:19 +0530, Rakesh Rajasekharan wrote:
I have uploaded the config.log at paste bin hope you would receive that. Meanwhile, I just went through the config log and suspect that there seems to be issues findng the libivonv library file. I had directly taken the libiconv package and installed it using the pkgadd command. Would that not be enough or do I need to compile it manually.
I suspect that libiconv does not have a static library, yet, judging by the gcc comandline, gcc is trying to link it statically (along with libintl, but since it errored on iconv which comes later, I think libintl is fine).
I'd check if it is, indeed, shared only (as in, there is no libiconv.a), and if so, compile one that has a static version aswell.
Another option would be - if you're fine with linking libiconv dynamically - to find the pkg-config control file for glib (/usr/local/lib/pkgconfig/glib-2.0.pc or something similar), and remove libiconv from the Libs line there, and add it to the linked libraries some other way (for example, by exporting LDFLAGS=-liconv before running configure). I haven't tested this second workaround, so your might have to tweak a few things if you go this route.
By the way: the newest version of syslog-ng from the 3.0.x series is 3.0.7, it might be worth going with that version instead, unless you need to stay with 3.0.1 for some reason.
Hope this helps! -- |8]
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.campin.net/syslog-ng/faq.html
participants (2)
-
Gergely Nagy
-
Rakesh Rajasekharan