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
Sending Sigint from Keyboard to Piped Commands in Bash
Configure Options for Building Mingw-64 on Linux-64 for Linux-64 (Ultimately Targetting Windows-64)
Scp: How to Find Out That Copying Was Finished
Docker Container Accessible Only via Cloudflare Cdn (Selected Ip Ranges)
Making 'Long' 4 Bytes in Gcc on a 64-Bit Linux MAChine
Random Number Between Range in Shell
Why Does Docker Prompt "Permission Denied" When Backing Up the Data Volume
How to Cross Compile R Packages for MACos from a Linux Environment
Prepend to Visual Block Not Working in Vim
Run Multiple Commands At Once in the Same Terminal
Check If Opencv Is Compiled with Tbb
Sudoers Nopasswd: Sudo: No Tty Present and No Askpass Program Specified
Light-Weight SQL Server for Linux/Windows
How to Change the Watchdog Timer in Linux Embedded
Windows Equivalent of ./ (Current Directory)
How to Narrow Down Perf.Data to a Time Sub Interval
How Does This Canonical Flock Example Work
If Adding a Command That Repeats Every 10 Minutes to Crontab, When Does the First Job Run