Questions tagged [automake]
Automake is a tool provided by GNU for the purpose of automating the generation of portable, configurable Makefiles.
1,087
questions
0
votes
1
answer
48
views
automake: how to portably throw an error and aborting the target
Depending on a condition checked for in the configure script, I want to throw an error, thus aborting the target. (i.e. refuse to compile tests on 'make check', if the test framework is not installed)
...
0
votes
1
answer
89
views
What are .Plo files and how are they used by the source code and GNU Autotools?
I am relatively new to C++ coding. I have a repository of C++ source code which along with the rest of the .h, .cpp, configure and Makefiles has many .Plo files. What are .Plo files and how are they ...
1
vote
3
answers
119
views
How to build c++20 using modules with autotools?
This is the project:
Source program using the keyword import: hello.cpp
import <iostream>;
#include "config.h"
int main() {
std::cout << "Hello World, " << &...
0
votes
0
answers
29
views
automake-1.4 missing when trying to install mecab
I have been trying to install mecab-ipadic-NEologd (following this and now being at step 2)
when running ./bin/install-mecab-ipadic-neologd -n I came across messages:
[make-mecab-ipadic-NEologd] : ...
0
votes
1
answer
36
views
Makefile.am: How to link a dynamic library only if the library exists/is installed on the system
I have a dynamic library /usr/lib64/liba-3.2.so.1. And, I am trying to change Makefile.am so that myprog_LDADD can link against this library if the file exists. Is there any way to do it?
I tried this:...
0
votes
1
answer
52
views
Configure script to write content of config.log into stdout and/or stderr
A bit complicated case: I'm trying to debug configure script which is run by Maven, which runs inside Docker container, which is run by GitHub Action. It fails and asks me to look into config.log. Of ...
0
votes
1
answer
60
views
Disable parallel execution in make
I have a building process that creates a header file. In the second stage, several source files are generated from that header file. Then these source files are built into a binary. If anyone is ...
0
votes
0
answers
99
views
Makefile.am: error: C++ source seen but 'CXX' is undefined
I am writing a C library and program using the Autotools stack. It's a pure C code base and it did compile before.
Now I get the following error during my autoreconf -v -f -i step:
Makefile.am: ...
0
votes
1
answer
30
views
Copying support files using Autotools
Using Autotools is there a way to copy regular text files from my test directory into a build/test directory?
My test directory looks like this:
Makefile.am
test/testfile.c
test/a.txt
test/b.txt
The ...
0
votes
0
answers
33
views
hugo builds with read-only source-tree
We would like to integrate hugo for documentation generation in our automake project.
The problem I'm facing is, that I would like to support
out-of-tree builds
builds from read-only source trees (...
0
votes
1
answer
77
views
How to use simple variable expansion in an Automake script as in a GNU Make script?
There are two flavors of a variable in GNU Make: "recursively expanded" and "simply expanded". VARIABLE:=VALUE yields simple expansion in Makefile but seems to yield recursive ...
0
votes
0
answers
93
views
How to use freetype in qtquick project on Windows 10
On my Windows 10, I installed msys2(include mingw32 and build tool, etc, the version is MINGW32_NT-10.0-19044 WIN-7VUR5T4P2BB 3.3.5-341.x86_64 2022-07-04 21:33 UTC x86_64 Msys) in c:\msys64 and qt ...
0
votes
1
answer
314
views
How to handle library dependencies with automake?
Let's assume the following project structure composed of one executable in src and two libraries, lib1 and its dependency lib1_dep:
+--src/
| |
| +--Makefile.am
| +--main.c
|
+--lib/
...
0
votes
1
answer
50
views
AC_CHECK_HEADERS: define a macro before testing for header presence
A particular C++ logging library called spdlog that I use in my project has a broken package on CentOS (the platform I'm trying to compile on) where the header file will only compile if ...
0
votes
1
answer
164
views
Problems with compiling C++/Cuda code after Linux update
We have an in-house C++-code which partly uses CUDA. The CUDA-code is spread between the files "cuda_kernel.hpp" and "cuda_kernel.cu".
All was good and the code compiled both on my ...
0
votes
1
answer
70
views
Old .Po file references old directory, how to start fresh?
Introduction
I just deleted the directory nested and removed the reference to it in my Makefile.am
I'm running ./configure && make and I get the following:
*** No rule to make target 'nested/...
0
votes
2
answers
136
views
Combining two conditionals using AND in Makefile.am
Is it possible to have something like below in a Makefile.am?
if CONDITION_1 and CONDITION_2
...
endif
Currently I have something like below in my configure.ac
AM_CONDITIONAL([COMBINED_CONDITION],
...
2
votes
1
answer
432
views
Unable to `make clean`: "No rule to make target ...Plo"
Question Summary
I'm trying to make clean and I'm getting the following output:
Makefile:835: /absolute/path/to/server/server/example/.deps/libfoo-bar.Plo: No such file or directory
Makefile:836: /...
0
votes
0
answers
291
views
Understanding chocolatey gcc compiler error on Windows
I am trying to compile PortAudio using the GitHub-hosted windows-latest runner.
I use the following code to compile (see here for the full script):
curl -sSLO https://github.com/PortAudio/portaudio/...
2
votes
2
answers
74
views
cannot build libtool library from non-libtool objects - any workaround?
I have this code for makefile automake:
noinst_LTLIBRARIES = libwinsane.la
libwinsane_la_SOURCES = init.c
libwinsane_la_CXXFLAGS = -I$(top_srcdir)
libwinsane_la_DEPENDENCIES = manifest.$(OBJEXT)
...
1
vote
1
answer
99
views
custom object rules inside Makefile.am for automake
Typical makefile.am, which works, would look like this for my project:
noinst_LTLIBRARIES = libwinsane.la
CLEANFILES = init.cpp
libwinsane_la_CXXFLAGS = \
-I$(top_srcdir)
libwinsane_la_SOURCES = \
...
0
votes
0
answers
14
views
Makefile.am - how to add rule for windres?
I have makefile.am used with automake for crossplatrom project , where I also need to build resource file, so I add it like this:
program_la_SOURCES = \
manifest.rc \
context.cpp \
forks.cpp \
....
0
votes
1
answer
1k
views
Automake configure wrong target type aarch64-unknown-linux-gnu
I'm trying to (cross)compile my automake project, which is originally developed for linux/x86_64, within a docker container running on an Apple Macbook with M1 chip.
The docker host (mac) is version ...
-1
votes
2
answers
145
views
Create directory structure in /var/lib using autotools and automake
I'm using autotools on a C project that, after installation, needs a particular directory structure in /var/lib as follows:
/var/lib/my-project/
data/
configurations/
local/
...
0
votes
1
answer
61
views
Automake LibSocketCan
I am using automake to build my project. My project uses pthread and libsocketcan. I have installed libsocketcan with the command
sudo apt-get install libsocketcan-dev
In eclpise I have added linker ...
0
votes
1
answer
98
views
Automake makefile doesn't link properly
I am building a project with Automake and I want to link GLFW and GLEW to the project. My Makefile.am looks like this:
AUTOMAKE_OPTIONS = foreign subdir-objects
bin_PROGRAMS = game
game_SOURCES = src/...
0
votes
1
answer
44
views
Pattern syntax %.3: man/libfoo.man in Automake with different base name
I wrote a library libfoo providing functions bar and baz.
I want the user to be able to find the same man-page (from mans/libfoo.man) when they call man libfoo, man bar and man baz (Similar to man ...
0
votes
0
answers
100
views
How to unconditionally recompile with automake's Makefiles
I have a project using autoconf/automake. Sometimes I want to remake part of it even though make (correctly) believes all dependencies are up-to-date. For other projects I can use make -W some-file.c ...
1
vote
2
answers
332
views
How to get libtool to statically link dependencies of a shared library
I'm preparing some patches for libFLAC, a lossless audio codec library. In the past, libFLAC has always been provided to windows users as a single DLL, with its dependency (libogg) embedded. This was ...
3
votes
1
answer
429
views
When using LIBADD in automake, libtool links incorrectly
I'm using automake to build my project. I have some third-party (open source) libraries as git submodules in my project that I want to individually build and link. Here's an edited (names changed) ...
0
votes
1
answer
98
views
How to build some sources of an autotools project using a non default compiler
I have an autotools C project. The project has some tests that require MPI to build. It is easy to compile an MPI program using the mpicc "C Compiler" as this makes sure the MPI library is ...
0
votes
0
answers
70
views
automake failed while switching git branches
I'm trying to compile C++ automake project:
./autogen.sh;./configure;
On the main branch is working as expected. On my feature branch I received the following error:
./configure: line 20576: syntax ...
1
vote
1
answer
292
views
Problem with autoconf not making gcc with -Wall warnings
I have a simple project with a simple configure.ac script:
AC_INIT(...)
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_PROG_CC
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES(...)
AC_OUTPUT
using GNU ...
0
votes
1
answer
206
views
How to issue a new compile command in Makefile.am?
I am building a library (using Autotools) that looks like the following. The building of the library works fine when I add a *.cpp file to libmytest_la_SOURCES.
lib_LTLIBRARIES = libmytest.la
...
0
votes
1
answer
161
views
Is there a way to check for compile flags that doesn't require the autoconf-archive package?
The AX_CHECK_COMPILE_FLAG macro is available in most distributions in the autoconf-archive package, but unfortunately when missing that package the error is impossible to understand:
./configure: 5358:...
0
votes
1
answer
156
views
Is it possible to set specific _CFLAGS, _LDADD etc. variables for all programs in a _PROGRAMS variable?
I'm developing a shared library which ships with test suites, all written in C.
I have a separate makefile which is included by the main Makefile.am, specifically for the tests, which looks similar to ...
1
vote
0
answers
69
views
autoconf set library search path
So on mac I have to export the library path and include path for OpenSSl because it's in /opt/brew. I have tried a couple of different things with setting it in both the configure.ac and Makefile.am ...
0
votes
1
answer
257
views
Yocto autotools do_compile fails
I have created a recipe in my custom layer like this:
SUMMARY = "Mednafen is a portable, utilizing OpenGL and SDL, argument(command-line)-driven multi-system emulator."
HOMEPAGE = "...
0
votes
1
answer
127
views
configure.ac with CRLF line endings
If an Autotools project is checked out on Windows using MSys Git (as opposed to Cygwin Git), line endings of the checked-out files will have Windows-native CRLF style (unless configured otherwise in ...
1
vote
1
answer
350
views
Running a build with multiple jobs (e. g.: -j8) seems to produce a race with Autotools-generated Makefiles
Consider I have a simple Autotools project consisting of just one source file (e. g.: amhello).
Now, for some reason, despite there's a direct dependency between all and check targets in the generated ...
0
votes
2
answers
912
views
Problem in configuring OpenMPI-4.1.1 in Linux
I am trying to configure and install OpenMPI-4.1.1 in a Linux system.
I tried the following command first to configure:
./configure --prefix=/usr/local
The last output lines are:
..........
Mellanox ...
0
votes
1
answer
39
views
make distclean breaks with non Automake external libraries
I have the following problem with Automake. My project uses Autoconf along with custom makefiles and makefile templates. I have partially converted the project to Autotools and I am now playing with ...
0
votes
1
answer
29
views
Automake: conditionally build subdirectories
In my Automake project I have a certain number of sub-packages among which I want to switch depending on a configure time option. According to the Automake documentation this is possible: https://www....
1
vote
2
answers
123
views
configure: Specify a path to search in for headers AFTER the default paths
To add a path to search in for header files, you can feed an -I argument to configure. However, the added path will then be searched in before the default ones, effectively overriding the default ones ...
0
votes
1
answer
428
views
How to make automake silent about missing files?
To build one project, I am using automake:
automake --foreign --add-missing --copy
The output is currently too verbose on standard error:
configure.ac:50: installing 'config/compile'
Makefile.am: ...
-1
votes
2
answers
335
views
How to handle library's function files (not header files) in autotools?
So recently I've been trying out autotools to build a C++ Library. Originally I was just working on pure custom classes, which is quite easy to just #include and then compile with g++. But when I want ...
0
votes
1
answer
324
views
How can I do in order to generate the makefile with ./configure?
I am trying to install EZTrace which is a tool that aims at generating automatically execution trace from HPC. I downloaded the installation folder from here, https://eztrace.gitlab.io/eztrace/index....
0
votes
1
answer
523
views
How to build static and shared library with autotools?
I'm learning use the Autotools. I am writing my first program with these tools, but I havve a problem. I am trying to make program that uses two libraries: one static and one shared. I configured ...
1
vote
0
answers
416
views
Missing GTK3 function
I'm failing to use a bootstrap for GTK3 using autoconf and automake. I'm following this guide.
I have installed gtk3 with: sudo apt install libgtk-3-dev
pkg-config --modversion gtk+-3.0 returns: 3.22....
1
vote
1
answer
42
views
GridDB automake warnings on MacOS
I am trying to build GridDB from source code on MacOS as recommended How to setup GridDB on macOS with instructions https://docs.griddb.net/gettingstarted/using-source-code/#build-a-server-and-client-...