[augeas-devel] augeas on AIX
David Lutterkort
lutter at redhat.com
Thu Jul 16 23:28:21 UTC 2009
On Fri, 2009-06-19 at 11:55 +0200, Kristof Willaert wrote:
> sorry for the late reply.
Not half as sorry for my tardiness in replying :(
> I'm quite ashamed to tell I just ripped out the "_long" from getopt_long, so
> some options are not available from the resulting binaries. I just wanted to get
> a working binary first.
> Diff is attached.
Heh .. not sure what the right answer is; maybe conditionally switch
between getopt and getopt_long depending on which one is available on a
platform.
> >> The second problem was a "referenced symbol not found" error in libfa.
> >> Asprintf (and vasprintf) is missing from the AIX libc. Configure notices that:
> >>
> >> checking for vasprintf... no
> >>
> >> and make compiles asprintf.c and vasprintf.c in gnulib/lib.
> >> But these are not linked into libfa.
> >
> > This is very strange - and it definitely works on other non-glibc
> > systems, like FreeBSD. The Makefile does link libfa with gnulib ... do
> > you have the errors from make ?
>
> Adding gnulib to src/Makefile.in for libfa make the thing compile and
> run with segfaulting:
>
> libfa_la_LIBADD = $(GNULIB)
>
> Had to force make to use the gnu ld instead of the AIX ld. AIX ld gave me:
>
> gcc -shared -o .libs/libaugeas.so.0 .libs/augeas.o .libs/pathx.o
> .libs/internal.o .libs/memory.o .libs/syntax.o .libs/parser.o
> .libs/builtin.o .libs/lens.o .libs/regexp.o .libs/transform.o
> .libs/ast.o .libs/get.o .libs/put.o ./.libs/liblexer.a
> ../gnulib/lib/.libs/libgnu.a
> -Wl,-blibpath:/tmp/augeas-0.5.0/src/.libs:/usr/local/lib:/opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.2.0:/opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.2.0/../../..:/usr/lib:/lib
> -L./.libs -lfa -lc -Wl,-bnoentry -Wl,-M -Wl,./augeas_sym.version
> -Wl,-bE:.libs/libaugeas.exp ${wl}-berok
> ld: 0711-715 ERROR: File ./augeas_sym.version cannot be processed.
> The file must be an object file, an import file, or an archive.
> collect2: ld returned 8 exit status
> make[3]: *** [libaugeas.la] Error 1
> make[3]: Leaving directory `/tmp/augeas-0.5.0/src'
> make[2]: *** [all] Error 2
> make[2]: Leaving directory `/tmp/augeas-0.5.0/src'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/tmp/augeas-0.5.0'
> make: *** [all] Error 2
We had the same issue for OS/X, and the changes to configure.ac in 0.5.2
_might_ just make it work with the AIX linker. If not, some more logic
is needed around the setting of VERSION_SCRIPT_FLAGS in configure.ac
> > Excellent ! I've been building/testing Augeas on OpenSolaris, but
> > getting it to work on Solaris proper would be really cool.
>
> Building on Solaris 10 was actually quite easy. The only thing I had
> to change was making sure
> gnulib was linked into libfa.
>
> I just changed src/Makefile.in to read:
>
> libfa_la_LIBADD = $(GNULIB)
>
> This should probably be done in Makefile.am though.
>
> I compiled with gcc 3.4.5 and used the native Solaris ld.
Cool, I just added that to Makefile.am.
> > If you feel really adventurous and have a debugger handy, you might want
> > to break on transform_load and step through it, in particular through
> > filter_generate and load_file.
>
> Did that, output in attachment. But I am really not qualified to
> interpret what gdb spits out.
Unfortunately, that log doesn't tell me enough to see what's going on.
If augtool segfaults on startup already, try the following:
> libtool --mode=execute gdb ./src/augtool
(gdb) run -I ./lenses quit
... stuff happens, hopefully program will abort with a SEGV ..
(gdb) bt
The backtrace should give some insight in what's happening.
David
More information about the augeas-devel
mailing list