From: Andrew J. S. <as...@te...> - 2019-06-17 12:44:56
|
Hi Luis, You do not need to compile your own gawk, if your system is running gawk 5.0, which is pretty new. In general, your problem seems to be that things are getting installed in the wrong place. When gawk is compiled, the library search path is fixed for that binary. In your case, it clearly does not include /usr/local/lib/gawk. You can override the builtin setting by configuring a value for AWKLIBPATH in your environment. For more info: https://www.gnu.org/software/gawk/manual/html_node/AWKLIBPATH-Variable.html You can see the default value like so: bash-4.2$ /bin/gawk 'BEGIN {print ENVIRON["AWKLIBPATH"]}' /usr/lib64/gawk In conclusion, you must do one of 3 things: 1. Use --prefix to install gawk-xml (and gawkextlib) in your system's standard location compiled into the gawk binary. 2. Compile your own version of gawk that will use a compatible value for --prefix so that it will be able to find the gawk-xml extension that you installed. 3. Configure AWKLIBPATH in your environment so that gawk knows where to search for the gawk-xml extension. Regards, Andy On Mon, Jun 17, 2019 at 11:25:08AM +0100, Luis P. Mendes wrote: > Hi Andy, > > I cannot reproduce the problem, even after untarring the gawkextlib > and gawk-xml tarballs again, without setting any --prefix=/usr/local > for the configuration script. > Even the make check for gawk-xml works fine now. > > > But now, still cannot use the xml tool: > $ awk -l xml workingdocuments.awk awk_demos/a.xml awk: fatal: can't > open shared library `xml' for reading (No such file or directory) > > The compilation arguments for my distro's gawk are: > configure_args="--with-readline" > > $ whereis awk > awk: /usr/bin/awk /usr/libexec/awk /usr/share/awk > /usr/share/man/man1p/awk.1p /usr/share/man/man1/awk.1 > > The installation destination for the xml library: > /usr/local/lib/gawk/xml.so > > > Do I need to compile a different gawk myself and place it under > /usr/local? > > > Thanks, > > > Luis > > > On 20190616 09:50:04 -0400, Andrew J. Schorr wrote: > > Hi Luis, > > > > The default autoconf prefix is /usr/local. If that's not where you intend > > to install, then you should specify a prefix explicitly. I recommend that > > you set --prefix explicitly instead of relying upon defaults. If you do > > that, does the build succeed? > > > > If you email the entire sequence of commands that you are running, then it > > will enable us to duplicate the problem. > > > > Also, that "Configured with" message seems to be incorrect. I tried > > the same thing, and it does say "Configured with: ../configure --prefix=/usr ...", > > but that's simply not true. That message seems to be a bug in the > > autoconf tools. If you run "grep prefix= config.log", you should see at the end: > > prefix='/usr/local' > > > > Regards, > > Andy > > > > On Sat, Jun 15, 2019 at 11:35:33PM +0100, Luis P. Mendes wrote: > > > Hi Andy, > > > > > > > > > # gawk -V > > > GNU Awk 5.0.0, API: 2.0 > > > > > > > > > I've downloaded and installed the latest gawkextlib I saw from > > > sourceforge: gawkextlib-1.0.4.tar.gz > > > > > > > > > I think I found an error. > > > This is in the config.log of gawkextlib: > > > Configured with: /builddir/gcc-8.3.0/configure > > > --build=x86_64-unknown-linux-gnu --enable-fast-character > > > --enable-vtable-verify --prefix=/usr --mandir=/usr/share/man > > > --infodir=/usr/share/info --libexecdir=/usr/ lib --libdir=/usr/lib > > > --enable-threads=posix --enable-__cxa_atexit --disable-multilib > > > --with-system-zlib --enable-shared --enable-lto --enable-plugins > > > --enable-linker-build-id --disable-werror --disable-nls -- > > > enable-default-pie --enable-default-ssp --enable-checking=release > > > --disable-libstdcxx-pch --with-isl --with-linker-hash-style=gnu > > > --disable-libunwind-exceptions --disable-target-libiberty > > > --enable-serial-confi gure > > > --enable-languages=c,c++,objc,obj-c++,fortran,lto,go,ada > > > > > > Please note that prefix is /usr, as I didn't specified any in the > > > configure command. > > > > > > But, > > > > > > # find /usr/ -name libgawkextlib.so.0 > > > /usr/local/lib/libgawkextlib.so.0 > > > > > > # ll /usr/local/lib/libgawkextlib.so > > > lrwxrwxrwx 1 root root 22 jun 15 18:26 /usr/local/lib/libgawkextlib.so > > > -> libgawkextlib.so.0.0.0 > > > > > > It seems that /usr/local/lib was used instead of /usr/lib. > > > > > > > > > > > > In the config.log of gawk-xml: > > > Configured with: /builddir/gcc-8.3.0/configure > > > --build=x86_64-unknown-linux-gnu --enable-fast-character > > > --enable-vtable-verify --prefix=/usr --mandir=/usr/share/man > > > --infodir=/usr/share/info --libexecdir=/usr/ lib --libdir=/usr/lib > > > --enable-threads=posix --enable-__cxa_atexit --disable-multilib > > > --with-system-zlib --enable-shared --enable-lto --enable-plugins > > > --enable-linker-build-id --disable-werror --disable-nls -- > > > enable-default-pie --enable-default-ssp --enable-checking=release > > > --disable-libstdcxx-pch --with-isl --with-linker-hash-style=gnu > > > --disable-libunwind-exceptions --disable-target-libiberty > > > --enable-serial-confi gure > > > --enable-languages=c,c++,objc,obj-c++,fortran,lto,go,ada > > > > > > > > > After a make clean in gawk-xml, the make command outputs an error: > > > gawk: xmlbase:14: fatal: load_ext: cannot open library > > > `../.libs/xml.so' (libgawkextlib.so.0: cannot open shared object file: > > > No such file or directory) > > > > > > > > > Thanks, > > > > > > > > > Luis > > > > > > > > > > > > On 20190615 15:41:07 -0400, Andrew J. Schorr wrote: > > > > Hi Luis, > > > > > > > > Which versions of gawk and gawkextlib are you using? > > > > Can you please share the entire sequence of commands you are running > > > > up through the "make check" that fails? It is clearly not configuring > > > > the environment variables properly, so it can't find the extension, > > > > as Jürgen pointed out. > > > > > > > > Regards, > > > > Andy > > > > > > > > On Sat, Jun 15, 2019 at 07:38:34PM +0100, Luis P. Mendes wrote: > > > > > Jürgen, > > > > > > > > > > I'm on Linux, not MacOSX: 4.19.50_1 #1 SMP PREEMPT x86_64 GNU/Linux > > > > > > > > > > > > > > > On Sat, Jun 15, 2019 at 7:29 PM Jürgen Kahrs via Gawkextlib-users < > > > > > gaw...@li...> wrote: > > > > > > > > > > Hello Luis, > > > > > I guess you tried this on MacOSX. > > > > > This seems to be the reason for the failed test cases: > > > > > .. LD_LIBRARY_PATH= DYLD_LIBRARY_PATH= gawk > > > > > > > > > > The environment variable DYLD_LIBRARY_PATH should have been > > > > > expanded as $DYLD_LIBRARY_PATH during configuration. > > > > > I am not quite sure where this information got lost, in the source > > > > > code or during configuration on your machine. Any idea ? > > > > > > > > > > > > > > > Jürgen Kahrs > > > > > > > > > > > > > > > > > > > > Hi, > > > > > > > > > > After some years since last used this wonderful tool, I'd like to > > > > > install gawk-xml. > > > > > As per the README, I've installed gawkextlib without problems. > > > > > Next, `configure` and ``make` for gawk-xml went fine, but not `make > > > > > check`. > > > > > Output of the command below. > > > > > Do I need to install extra packages? > > > > > Thanks > > > > > > > > > > $ make check > > > > > Making check in awklib > > > > > make[1]: Entering directory '/home/lupe/recolhidos/gawkextlib/ > > > > > gawk-xml-1.1.1/awklib' > > > > > make[1]: Nothing to be done for 'check'. > > > > > make[1]: Leaving directory '/home/lupe/recolhidos/gawkextlib/ > > > > > gawk-xml-1.1.1/awklib' > > > > > Making check in po > > > > > make[1]: Entering directory '/home/lupe/recolhidos/gawkextlib/ > > > > > gawk-xml-1.1.1/po' > > > > > make[1]: Leaving directory '/home/lupe/recolhidos/gawkextlib/ > > > > > gawk-xml-1.1.1/po' > > > > > Making check in packaging > > > > > make[1]: Entering directory '/home/lupe/recolhidos/gawkextlib/ > > > > > gawk-xml-1.1.1/packaging' > > > > > make[1]: Nothing to be done for 'check'. > > > > > make[1]: Leaving directory '/home/lupe/recolhidos/gawkextlib/ > > > > > gawk-xml-1.1.1/packaging' > > > > > Making check in test > > > > > make[1]: Entering directory '/home/lupe/recolhidos/gawkextlib/ > > > > > gawk-xml-1.1.1/test' > > > > > > > > > > AWK = LC_ALL=C LANG=C AWKLIBPATH=../.libs:/usr/lib/gawk PATH=/home/lupe > > > > > /bin:/home/lupe/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/ > > > > > sbin:/sbin:/opt/texlive/2019/bin/x86_64-linux:/usr/local/bin/fim:/opt/ > > > > > texlive/2017/bin/x86_64-linux:/home/lupe/go/bin:/home/lupe/.fzf/bin:/ > > > > > usr/local/bin/fim:/opt/texlive/2017/bin/x86_64-linux:/home/lupe/prog/go > > > > > /bin LD_LIBRARY_PATH= DYLD_LIBRARY_PATH= gawk > > > > > > > > > > Locale environment: > > > > > LC_ALL="C" LANG="C" > > > > > > > > > > ======== Starting XML extension tests ======== > > > > > xdocbook > > > > > ./xdocbook.ok _xdocbook diferem: byte 1, linha 1 > > > > > make[1]: [Makefile:574: xdocbook] Error 1 (ignored) > > > > > xdeep2 > > > > > ./xdeep2.ok _xdeep2 diferem: byte 1, linha 1 > > > > > make[1]: [Makefile:602: xdeep2] Error 1 (ignored) > > > > > xattr > > > > > ./xattr.ok _xattr diferem: byte 1, linha 1 > > > > > make[1]: [Makefile:608: xattr] Error 1 (ignored) > > > > > xfujutf8 > > > > > ./xfujutf8.ok _xfujutf8 diferem: byte 1, linha 1 > > > > > make[1]: [Makefile:614: xfujutf8] Error 1 (ignored) > > > > > xotlsjis > > > > > ./xotlsjis.ok _xotlsjis diferem: byte 1, linha 1 > > > > > make[1]: [Makefile:626: xotlsjis] Error 1 (ignored) > > > > > xfujeucj > > > > > ./xfujeucj.ok _xfujeucj diferem: byte 1, linha 1 > > > > > make[1]: [Makefile:620: xfujeucj] Error 1 (ignored) > > > > > ./xload.ok _xload diferem: byte 52, linha 2 > > > > > make[1]: [Makefile:631: xload] Error 1 (ignored) > > > > > xmlinterleave > > > > > ./xmlinterleave.ok _xmlinterleave diferem: byte 1, linha 1 > > > > > make[1]: [Makefile:582: xmlinterleave] Error 1 (ignored) > > > > > beginfile > > > > > ./beginfile.ok _beginfile diferem: byte 1, linha 1 > > > > > make[1]: [Makefile:588: beginfile] Error 1 (ignored) > > > > > ======== Done with XML extension tests ======== > > > > > make[2]: Entering directory '/home/lupe/recolhidos/gawkextlib/ > > > > > gawk-xml-1.1.1/test' > > > > > 9 TESTS FAILED > > > > > make[2]: *** [Makefile:516: pass-fail] Error 1 > > > > > make[2]: Leaving directory '/home/lupe/recolhidos/gawkextlib/ > > > > > gawk-xml-1.1.1/test' > > > > > make[1]: *** [Makefile:555: check] Error 2 > > > > > make[1]: Leaving directory '/home/lupe/recolhidos/gawkextlib/ > > > > > gawk-xml-1.1.1/test' > > > > > make: *** [Makefile:591: check-recursive] Error 1 > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Gawkextlib-users mailing list > > > > > Gaw...@li... > > > > > https://lists.sourceforge.net/lists/listinfo/gawkextlib-users > > > > > > > > > > > > > > > _______________________________________________ > > > > > Gawkextlib-users mailing list > > > > > Gaw...@li... > > > > > https://lists.sourceforge.net/lists/listinfo/gawkextlib-users > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Gawkextlib-users mailing list > > > > > Gaw...@li... > > > > > https://lists.sourceforge.net/lists/listinfo/gawkextlib-users > > > > > > > > > > > > > > > > > _______________________________________________ > > > Gawkextlib-users mailing list > > > Gaw...@li... > > > https://lists.sourceforge.net/lists/listinfo/gawkextlib-users > > > > > _______________________________________________ > Gawkextlib-users mailing list > Gaw...@li... > https://lists.sourceforge.net/lists/listinfo/gawkextlib-users -- Andrew Schorr e-mail: as...@te... Telemetry Investments, L.L.C. phone: 917-305-1748 545 Fifth Ave, Suite 1108 fax: 212-425-5550 New York, NY 10017-3630 |