[syslog-ng] compiling syslog-ng for armv7 platform on linux with TLS support

Chris Packham Chris.Packham at alliedtelesis.co.nz
Tue Feb 9 05:42:42 CET 2016


Not sure how your particular build system handles it but there are some 
magic CFLAGS and LDFLAGS you need for glib.

syslog-ng picks these up automatically using pkg-config but since you're 
cross-compiling you probably need to set PKG_CONFIG and/or 
PKG_CONFIG_PATH to point to the right place. Otherwise glib will get 
confused and probably take some values from your host system.

For what it's worth I wrote the buildroot (https://buildroot.org) 
package for syslog-ng. I don't think I ever tried 3.6.4 but 3.7.2 is on 
many architectures without issue.

On 02/08/2016 07:09 PM, Scheidler, Balázs wrote:
> Hi,
>
> Honestly I don't know. Those errors are reported by the assembler, gcc
> probably generated some kind of opcodes it didn't recognize.
>
> One idea I have is that glib has some inline assembly stuff in
> gatomic.h, so *maybe* that is the root cause. To confirm that you'll
> need to compare the offending lines in the generated assembly file to
> the functions in glib headers.
>
> Glib probably attempts to detect which processor you have and uses an
> ifdef trickery to use the appropriate code fragment. I guess there's a
> generic implementation not using inline assembly. So you might try to
> force that by playing with glib configure options.
>
> Bazsi
>
> On Feb 7, 2016 1:45 PM, "Girish Kumar" <girish.kumar at al-enterprise.com
> <mailto:girish.kumar at al-enterprise.com>> wrote:
>
>     Hi,____
>
>     __ __
>
>     I have changed the syslog-ngd to syslog-ng____
>
>     __ __
>
>     I am getting following error while compiling syslog-ng . ____
>
>     My tool chain is perfectly fine. I have complied many other packages
>     which are fine. With syslog-ng I am getting following error.____
>
>     __ __
>
>     Could you please guide me on this. It would be great if you can give
>     me some guidelines on how to compile  syslog-ng on armv7 arch on
>       linux platform ____
>
>     __ __
>
>     __ __
>
>        CC     lib/lib_libsyslog_ng_la-mainloop-call.lo____
>
>     /tmp/ccChQOWy.s: Assembler messages:____
>
>     /tmp/ccChQOWy.s:260: Error: invalid operands (.text and *UND*
>     sections) for `-'____
>
>     /tmp/ccChQOWy.s:269: Error: invalid operands (.text and *UND*
>     sections) for `-'____
>
>     make[4]: *** [lib/lib_libsyslog_ng_la-mainloop-call.lo] Error 1____
>
>     make[3]: *** [all-recursive] Error 1____
>
>     make[2]: *** [all] Error 2____
>
>     make[2]: Leaving directory
>     `/home/gkuma020/PERFORCE/7.X.X.R01-gkuma020-gg/engr/sw/tps/objs/46/7.X.X.R01/armv7/syslog-ng'____
>
>     make[2]: Entering directory
>     `/home/gkuma020/PERFORCE/7.X.X.R01-gkuma020-gg/engr/sw/tps/objs/46/7.X.X.R01/armv7/syslog-ng'____
>
>     make --no-print-directory install-recursive____
>
>        CC     lib/lib_libsyslog_ng_la-mainloop-call.lo____
>
>     /tmp/cc0N5KS5.s: Assembler messages:____
>
>     /tmp/cc0N5KS5.s:260: Error: invalid operands (.text and *UND*
>     sections) for `-'____
>
>     /tmp/cc0N5KS5.s:269: Error: invalid operands (.text and *UND*
>     sections) for `-'____
>
>     make[4]: *** [lib/lib_libsyslog_ng_la-mainloop-call.lo] Error 1____
>
>     make[3]: *** [install-recursive] Error 1____
>
>     make[2]: *** [install] Error 2____
>
>     make[2]: Leaving directory
>     `/home/gkuma020/PERFORCE/7.X.X.R01-gkuma020-gg/engr/sw/tps/objs/46/7.X.X.R01/armv7/syslog-ng'____
>
>     make[1]: ***
>     [/home/gkuma020/PERFORCE/7.X.X.R01-gkuma020-gg/engr/sw/tps/built/46/7.X.X.R01/armv7/sbin/syslog-ng]
>     Error 2____
>
>     make[1]: Leaving directory
>     `/home/gkuma020/PERFORCE/7.X.X.R01-gkuma020-gg/engr/sw/tps'____
>
>     make: *** [tps-build] Error 2____
>
>     + set +x____
>
>     __ __
>
>     Regards,____
>
>     Girish____
>
>     __ __
>
>     *From:*syslog-ng-bounces at lists.balabit.hu
>     <mailto:syslog-ng-bounces at lists.balabit.hu>
>     [mailto:syslog-ng-bounces at lists.balabit.hu
>     <mailto:syslog-ng-bounces at lists.balabit.hu>] *On Behalf Of
>     *Scheidler, Balázs
>     *Sent:* Sunday, February 07, 2016 2:30 AM
>     *To:* Syslog-ng users' and developers' mailing list
>     *Subject:* Re: [syslog-ng] compiling syslog-ng for armv7 platform on
>     linux with TLS support____
>
>     __ __
>
>     Sorry but I don't know the target environment so reviewing this is
>     pretty impossible. If it compiles with these and at least the
>     functest runs then it should be OK.____
>
>     Do you have a specific reason to call syslog-ng binary as
>     syslog-ngd? On other platforms it is syslog-ng.____
>
>     On Feb 4, 2016 12:31 PM, "Girish Kumar"
>     <girish.kumar at al-enterprise.com
>     <mailto:girish.kumar at al-enterprise.com>> wrote:____
>
>     Hi All,____
>
>     ____
>
>     Presently I am compiling for armv7 platform on linux. Please let me
>     know  whether following settings are fine____
>
>     ____
>
>     syslog-ng_deps = $(shell find $(LTOP)/syslog-ng-3.6.4 -type f)____
>
>     $(OBJS)/syslog-ng/syslog-ng.configured: $(syslog-ng_deps)
>     $(RAMDISK_LIB)/libssl.so.1.0.0 eventlog____
>
>          @rm -rf $(OBJS)/syslog-ng;____
>
>          @mkdir -p $(OBJS)/syslog-ng;____
>
>          @cd $(OBJS)/syslog-ng;\____
>
>          declare -x PATH=$(CCPATH):$(PATH);\____
>
>          declare -x CFLAGS="$(PLATFORM_CFLAGS) -I$(CROSSINCS)
>     -I$(BUILT_INCLUDES)";\____
>
>          declare -x CPPFLAGS="$(PLATFORM_CPPFLAGS) -I$(CROSSINCS)
>     -I$(BUILT_INCLUDES)";\____
>
>          declare -x LDFLAGS="$(PLATFORM_LDFLAGS) -L$(CROSSLIBS)
>     -L$(BUILT_LIBS) -lcrypto -levtlog";\____
>
>          declare -x EVTLOG_CFLAGS="$(PLATFORM_CFLAGS) -I$(CROSSINCS)
>     -I$(BUILT_INCLUDES) -I$(BUILT_INCLUDES)/eventlog";\____
>
>          declare -x EVTLOG_LIBS="$(PLATFORM_LDFLAGS) -L$(CROSSLIBS)
>     -L$(BUILT_LIBS) -levtlog";\____
>
>          declare -x ac_cv_func_malloc_0_nonnull="yes";\____
>
>          declare -x ac_cv_func_realloc_0_nonnull="yes";\____
>
>          $(LTOP)/syslog-ng-3.6.4/configure --prefix=/
>     --host=$(CCPREFIX)\____
>
>              --enable-ssl --enable-glib &>
>     $(OBJS)/syslog-ng/configure.out____
>
>          @touch $(OBJS)/syslog-ng/syslog-ng.configured____
>
>     $(BUILT_BASE)/sbin/syslog-ngd:
>     $(OBJS)/syslog-ng/syslog-ng.configured____
>
>          @cd $(OBJS)/syslog-ng;\____
>
>          declare -x PATH=$(CCPATH):$(PATH);\____
>
>          declare -x CFLAGS="$(PLATFORM_CFLAGS) -I$(CROSSINCS)
>     -I$(BUILT_INCLUDES)";\____
>
>          declare -x CPPFLAGS="$(PLATFORM_CPPFLAGS) -I$(CROSSINCS)
>     -I$(BUILT_INCLUDES)";\____
>
>          declare -x LDFLAGS="$(PLATFORM_LDFLAGS) -L$(CROSSLIBS)
>     -L$(BUILT_LIBS) -lcrypto -levtlog";\____
>
>          declare -x EVTLOG_CFLAGS="$(PLATFORM_CFLAGS) -I$(CROSSINCS)
>     -I$(BUILT_INCLUDES) -I$(BUILT_INCLUDES)/eventlog";\____
>
>          declare -x EVTLOG_LIBS="$(PLATFORM_LDFLAGS) -L$(CROSSLIBS)
>     -L$(BUILT_LIBS) -levtlog";\____
>
>          $(MAKE) &> $(OBJS)/syslog-ng/make.out;\____
>
>          make install prefix=$(BUILT_BASE) &>
>     $(OBJS)/syslog-ng/install.out____
>
>     ____
>
>     $(RAMDISK_SBIN)/syslog-ngd: $(BUILT_BASE)/sbin/syslog-ngd____
>
>          @cp -rf $(BUILT_BASE)/lib/syslog-ng $(RAMDISK_LIB)____
>
>         @cp -f $(BUILT_BASE)/sbin/syslog-ngd $(RAMDISK_SBIN)____
>
>          @echo "$(PLATFORM_DIR) syslog-ngd done"____
>
>     ____
>
>     syslog-ng: $(RAMDISK_SBIN)/syslog-ngd____
>
>     ____
>
>     Regards,____
>
>     Girish____
>
>
>     ______________________________________________________________________________
>     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
>
>     ____
>
>
>     ______________________________________________________________________________
>     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
>
>



More information about the syslog-ng mailing list