[syslog-ng] Solaris 10 support(?) in latest versions (e.g. 3.3.2)

Pal Tamas folti at balabit.hu
Wed Nov 16 10:36:37 CET 2011


On Tue, Nov 15, 2011 at 02:58:29PM -0600, Marvin Nipper wrote:
> Bazsi,
> 
> As a follow-up to my last email, I did change the values in the two header files that you mentioned trying.  The compilation then went much further, but failed at a later point, for similar reasons as before:
> 
> libtool: link: gcc -std=gnu99 -shared -Wl,-z -Wl,text -Wl,-h -Wl,libsyslog-ng-3.3.2.so -o .libs/libsyslog-ng-3.3.2.so  .libs/afinter.o .libs/alarms.o .libs/apphook.o .libs/block-ref-parser.o .libs/center.o .libs/cfg.o .libs/cfg-lexer.o .libs/cfg-parser.o .libs/children.o .libs/compat.o .libs/control.o .libs/dgroup.o .libs/dnscache.o .libs/driver.o .libs/filter.o .libs/filter-expr-parser.o .libs/globals.o .libs/gprocess.o .libs/gsockaddr.o .libs/gsocket.o .libs/logmatcher.o .libs/logmpx.o .libs/logmsg.o .libs/logparser.o .libs/logpipe.o .libs/logprocess.o .libs/logproto.o .libs/logqueue.o .libs/logqueue-fifo.o .libs/logreader.o .libs/logrewrite.o .libs/logsource.o .libs/logstamp.o .libs/logtransport.o .libs/logwriter.o .libs/mainloop.o .libs/memtrace.o .libs/messages.o .libs/misc.o .libs/msg-format.o .libs/nvtable.o .libs/parser-expr-parser.o .libs/persist-state.o .libs/plugin.o .libs/pragma-parser.o .libs/rewrite-expr-parser.o .libs/scratch-buffers.o .libs/serialize.o .libs/s
>  group.o .libs/stats.o .libs/str-format.o .libs/syslog-names.o .libs/tags.o .libs/templates.o .libs/timeutils.o .libs/utils.o .libs/value-pairs.o .libs/cfg-lex.o .libs/cfg-grammar.o .libs/filter-expr-grammar.o .libs/block-ref-grammar.o .libs/pragma-grammar.o .libs/parser-expr-grammar.o .libs/rewrite-expr-grammar.o   -R/usr/local/lib -R/usr/local/lib -L/var/opt/packages/syslog-ng-3.3.2/lib/ivykis/lib/.libs -ldoor -lsocket -lnsl -L/usr/local/lib /usr/local/lib/libgmodule-2.0.so /usr/local/lib/libgthread-2.0.so -lthread -lrt /usr/local/lib/libglib-2.0.so /usr/local/lib/libevtlog.so -lresolv -ldl -L/var/opt/packages/syslog-ng-3.3.2/lib/ivykis/lib /var/opt/packages/syslog-ng-3.3.2/lib/ivykis/lib/.libs/libivykis.a -L/var/opt/packages/syslog-ng-3.3.2/lib/ivykis/modules /var/opt/packages/syslog-ng-3.3.2/lib/ivykis/modules/.libs/libivykis-modules.a -lpthread -lc  -pthread -Wl,--whole-archive -Wl,--no-whole-archive   -pthread
> gcc: unrecognized option `-pthread'
> gcc: unrecognized option `-pthread'
> ld: fatal: relocation error: R_386_GOTOFF: file .libs/mainloop.o: symbol __tls: relocation illegal for TLS symbol
> ld: fatal: relocation error: R_386_GOTOFF: file .libs/mainloop.o: symbol __tls: relocation illegal for TLS symbol
> ld: fatal: relocation error: R_386_GOTOFF: file .libs/mainloop.o: symbol __tls: relocation illegal for TLS symbol
> ld: fatal: relocation error: R_386_GOTOFF: file .libs/mainloop.o: symbol __tls: relocation illegal for TLS symbol
> ld: fatal: relocation error: R_386_GOTOFF: file .libs/mainloop.o: symbol __tls: relocation illegal for TLS symbol
> collect2: ld returned 1 exit status
> gmake[4]: *** [libsyslog-ng.la] Error 1
> gmake[4]: Leaving directory `/var/opt/packages/syslog-ng-3.3.2/lib'
> gmake[3]: *** [all-recursive] Error 1
> gmake[3]: Leaving directory `/var/opt/packages/syslog-ng-3.3.2/lib'
> gmake[2]: *** [all] Error 2
> gmake[2]: Leaving directory `/var/opt/packages/syslog-ng-3.3.2/lib'
> gmake[1]: *** [all-recursive] Error 1
> gmake[1]: Leaving directory `/var/opt/packages/syslog-ng-3.3.2'
> gmake: *** [all] Error 2
> 
> 
> Also note that the compiler (throughout all of the compilations) does continually complain about the -pthread option.
Your GCC doesn't support the -pthread option, which itself is a shortcut
argument telling GCC to setup itself and the linker to compile and build
things with pthread support.

> 
> All of this is just FYI, in case you do attempt to tackle this.
> 
> Thanks again.
> 
> -----Original Message-----
> From: Marvin Nipper 
> Sent: Tuesday, November 15, 2011 12:54 PM
> To: 'Syslog-ng users' and developers' mailing list'
> Subject: RE: [syslog-ng] Solaris 10 support(?) in latest versions (e.g. 3.3.2)
> 
> See below, tagged with my name.
> 
> -----Original Message-----
> From: syslog-ng-bounces at lists.balabit.hu [mailto:syslog-ng-bounces at lists.balabit.hu] On Behalf Of Balazs Scheidler
> Sent: Tuesday, November 15, 2011 12:12 PM
> To: Syslog-ng users' and developers' mailing list
> Subject: Re: [syslog-ng] Solaris 10 support(?) in latest versions (e.g. 3.3.2)
> 
> [Marvin Nipper] ---Purging content, due to email size----
> 
> 
> There's a bundled library in syslog-ng code, ivykis. The error happens
> when linking one of the test programs for ivykis. I'm not sure why that
> happens, it does link for us properly, but maybe because we use a
> different compiler (as described by Folti).
> 
> However TLS (=Thread Local Storage) is not a mandatory compiler feature,
> both syslog-ng and ivykis can operate without it, the issue is that the
> configure script detects that your compiler/linker is supposed to
> support it.
> 
> Check out syslog-ng-3.3.2/config.log and
> syslog-ng-3.3.2/lib/ivykis/config.log, and look for "__thread" in the
> logs,
> [Marvin Nipper] FYI, neither of these has any instance of this string.
> 
> 
>  alternatively check config.h for both directories and check if
>   * syslog-ng/config.h: HAVE_THREAD_KEYWORD  is defined
> [Marvin Nipper] Yes: #define HAVE_THREAD_KEYWORD 1
> 
>   * syslog-ng/lib/ivykis/config.h: HAVE_TLS is defined.
> [Marvin Nipper] Yes: #define HAVE_TLS 1
> 
> 
> 
> It'll probably be defined. You can retry compilation by changing the
> config.h files and undef those and recompile.
> 
> The only question is why it gets detected and not work at the end. This
> test is used for both:
> 
> 
> AC_LINK_IFELSE([AC_LANG_PROGRAM(
> [[#include <pthread.h>
> __thread int a;
> ]],
> [a=0;])],
> [ac_cv_have_tls=yes; AC_DEFINE_UNQUOTED(HAVE_THREAD_KEYWORD, 1, "Whether Transport Layer Security is supported by the system")])
> [Marvin Nipper] making an assumption about the syntax of this test, my pthread.h (in /usr/include) has no instance of ac_cv_have_tls.
> 
> 
> 
> I'm not sure if we can actually reliably detect if TLS is available. It
> could make sense to make it a configure parameter after all. (which I'm
> usually against...).
> 
> syslog-ng does support Solaris (the PE staff regularly compiles & tests
> it under Solaris 8, 9, 10; sparc, i386, amd64), however it is not just
> Solaris, gcc/binutils/etc are all part of the picture.
> 
> Keeping a "good" build environment on these platforms is not always
> easy. 
> [Marvin Nipper] "Annoyingly", I "blew away" the previous version of my Dev server, which was a patched up version of Solaris 10 U4, and replaced it with a "brand spanking new" U10 deployment (as previously mentioned).  My primary reason for doing that was that I'd HOPED, in the MANY years between the U4 and U10 versions, that maybe Sun(Oracle) has actually "done something useful", and brought their GCC components up to something beyond 3.4.3.  Of course, I was horribly disappointed to find out that the development components in their sfw deployment, were still just as "ancient" as before.
> 
> I had also (at that same time) looked into the GNU instructions for building a current version of GCC, but there are a TON of dependencies (and it looked "messy", which is probably an understatement).  I really didn't have time to mess with it, when I checked it out, and I also figured that I probably only had a 50/50 chance of producing something that would work properly (based on all of the dependent components).  I DID just check out that jblopen.com blog, from Pal's email, and that seems like a FAR EASIER set of instructions for producing a newer version of GCC.  I'll try to set aside some time, at some point in the not-too-distant future, to see if I can build a better compiler.
> 
> Obviously, if you see anything from my input above, that would allow this to compile properly on the "stock version" of Solaris 10 (U10), that would also be helpful.  I WILL try messing with the "config" header files, to see if I can use that for now, and again, if you need me to test anything, I'm glad to do that as well.
> 
> !!!!!!!!!!! THANKS to everyone who responded so quickly !!!!!!!!!!!!!
> M.
> 
> 
> 
> The use of __thread is completely optional in the codebase itself.
> 
> -- 
> Bazsi
> 
> 
> ______________________________________________________________________________
> Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
> Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng
> FAQ: http://www.balabit.com/wiki/syslog-ng-faq
> 
> 
> 
> This e-mail may contain confidential and/or privileged information. If you are
> not the intended recipient (or have received this e-mail in error) please 
> notify the sender immediately and destroy this e-mail. Any unauthorized 
> copying, disclosure or distribution of the material in this e-mail is strictly 
> forbidden.
> 
> ______________________________________________________________________________
> Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
> Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng
> FAQ: http://www.balabit.com/wiki/syslog-ng-faq
> 
> 

-- 
Pal Tamas/Folti
folti at balabit.hu



More information about the syslog-ng mailing list