On Mon, 2009-06-15 at 10:58 +0200, Kristof Willaert wrote: > On Sun, Jun 14, 2009 at 6:37 AM, David Lutterkort<[email protected]> wrote: > > On Sat, 2009-06-13 at 15:22 +0200, Kristof Willaert wrote: > >> I have been trying to build Augeas on AIX (5.3). > > > > Excellent ! I know nothing about AIX, but would love to have Augeas work > > there. > > >> So far I have been able > >> to get it to compile and run without segfaulting. Had to work around the > >> non-existing getopt_long in AIX, and manually link a few gnulib .o files > >> into > >> libfa, but it is running. > > > > Can you send details of what you needed to do ? I'd like to add that in. > > Sure. > The getopt_long function does not exist in AIX libc, and there is no > substitute > in gnulib. So I kind of mangled the source and used getopt instead > (getopt_long > only adds the --noload and --nostdinc arguments I think, and just to > get it to compile > they were not crucial). > There is definitely a better way to fix this, but due to my lack of C skills > ...
The 'getopt' module from gnulib actually contains getopt_long, unfortunately, it's licensed LGPLv3 - I need to see if I can get the gnulib maintainers to relicense it. In the meantime, it would be great if you could post a patch of what you did (a simple unified diff is good enough) > 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 ? > On a related note, I also compiled Augeas on a stock Solaris 10 (yes we have > an > exotic range of machines to administer :), I'll send the fixes I had > to perform if > you want. So far tests on Solaris have been successful. Excellent ! I've been building/testing Augeas on OpenSolaris, but getting it to work on Solaris proper would be really cool. > >> What isn't working, is that I don't see anything in the /files subtree > >> in augtool. > >> The /augeas subtree is populated with all the lenses, but nothing appears > >> in /files: > >> > >> nim > augtool > >> augtool> ls / > >> augeas/ = (none) > >> files = (none) > >> augtool> ls /files > >> augtool> > > > > Does 'print /augeas//error' show anything ? Might be best if you can run > > 'augtool print >somefile.txt' and send that file as an attachment. > > print /augeas//error gives me nothing. > > nim > augtool > augtool> print /augeas//error > augtool> > > Augtool print output below. I removed all lenses except the > aliases.aug, util.aug and > sudoers.aug to simplify things (aliases file and sudoers are > syntactically the same on all unices I think): sudoers and aliases are actually syntactically quite different, at least on Linux. > nim > augtool print > /augeas > /augeas/root = "/" > /augeas/version = "0.5.0" > /augeas/version/save > /augeas/version/save/mode[1] = "backup" > /augeas/version/save/mode[2] = "newfile" > /augeas/version/save/mode[3] = "noop" > /augeas/version/save/mode[4] = "overwrite" > /augeas/version/defvar > /augeas/save = "overwrite" > /augeas/load > /augeas/load/Aliases > /augeas/load/Aliases/lens = "@Aliases" > /augeas/load/Aliases/incl = "/etc/aliases" > /augeas/load/Sudoers > /augeas/load/Sudoers/lens = "@Sudoers" > /augeas/load/Sudoers/incl = "/etc/sudoers" > /augeas/load/Sudoers/excl[1] = "*.augnew" > /augeas/load/Sudoers/excl[2] = "*.augsave" > /augeas/load/Sudoers/excl[3] = "*.rpmsave" > /augeas/load/Sudoers/excl[4] = "*.rpmnew" > /augeas/load/Sudoers/excl[5] = "*~" > /augeas/files > /files > nim > > > So it does not load any config files (while they are available on the system). Looking at your truss output, it seems to stat /etc/sudoers (after a lot of ugly chdir's), but never tries to open it - if it tried and failed, you should get some sort of error message in /augeas/files/etc/sudoers/error (which 'print /augeas//error' would show) Also, I see it stat /tmp, which shouldn't happen unless you mention that explicitly on the command line or in one of the lenses. 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. David _______________________________________________ augeas-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/augeas-devel
