Possibly Undefined MACro: Ac_Prog_Libtool

Docker Alpine Error: possibly undefined macro: AC_PROG_LIBTOOL

I was finally able to resolve it. Though i came across this link before, that time i just checked the Contents of package section. Today i again visited libtool's page and finally noticed that there is a Depends section on the right-hand side that mentions two packages as dependency (bash and libltdl) for libtool. Installing both the packages did the trick. :)


UPDATE:

Although my issue was resolved, i thought of cleaning up the script just to ensure i don't end up adding unnecessary packages to my image. That's when i found that my earlier assumption about explicitly adding bash and libltdl packages for fixing libtool dependency was wrong. I am going to write all the issues (and fixes) that i encountered while trying to build my docker image for building React project. It's more of a note for me and might still help someone.

Issues and Fixes:

1) npm WARN lifecycle <project_name>@3.6.0~preinstall: cannot run in wd %s %s (wd=%s) <project_name>@3.6.0 npm run npmcheckversion /opt/atlassian/pipelines/agent/build

Fix: Image was running with root user and not with node user. At the end of my Dockerfile, i added this line:

USER node

What this does is runs the image as the specified user and not as root user.

Ref: https://docs.docker.com/v17.09/engine/reference/builder/#user


2) Error: pngquant failed to build, make sure that libpng-dev is installed

Fix: As mentioned in the error message, i installed package libpng-dev


3) /bin/sh: autoreconf: not found

Fix: To fix this, i installed autoconf and libtool. Please note that libtool automatically installs its dependencies i.e., libltdl and bash.

I checked the list of installed packages and was able to confirm that libtool was actually installed but the build again failed, although with another error.


4) Can't exec "aclocal": No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm line 326.
autoreconf: failed to run aclocal: No such file or directory

Fix: automake was required to fix the issue. Still, one more error was about to come :)


5) configure: error: no nasm (Netwide Assembler) found

Fix: Installing nasm package fixed it.


That's it. I was ready with my final image. ;)

possibly undefined macro: AC_MSG_ERROR

I had this same issue and found that pkg-config package was missing.

After installing the package, everything generated correctly.

Autorreconf and error: possibly undefined macro: AM_NLS

What is the problem and how do I fix it?

The problem is it's expecting GNU gettext, specifically on Fedora 25 gettext-devel. It's in /usr/share/aclocal/nls.m4 contained in that package. You should be able to install that package and build.

AM_PROG_LIBTOOL not found in library

You might need: autoreconf -fvi to make sure everything is updated.

It's also worth noting that AM_PROG_LIBTOOL is deprecated, and should be replaced with LT_INIT, and optionally with LT_PREREQ beforehand.



Related Topics



Leave a reply



Submit