Questions tagged [autotools]
Autotools is a suite of programming tools (mainly autoconf, automake, and libtool) designed to assist in making source-code packages portable to many Unix-like systems.
1,522
questions
0
votes
1
answer
13
views
CMake forwarding parallel builds to make when using ExternalProject_Add on a Autotools-generated project
I'm trying to have CMake to call make in parallel mode when using ExternalProject_Add, but the external project's makefiles aren't being generated by CMake, but with Autotools. I don't want to hard-...
0
votes
0
answers
44
views
How to compile and link a cpp file separately in unity builds?
I have a file for which I wish to disable unity builds as it causes linker error.
For CMake I achieved the result using this-
set_source_files_properties(foo.cpp PROPERTIES SKIP_UNITY_BUILD_INCLUSION ...
0
votes
0
answers
21
views
How to replicate, sort of, CMakeLists.txt files into autotools files?
I have a directory structure with source code cpp- and header-files in many subdirectories at many different levels. Each directory has its own CMakeLists.txt specifying how the library target in that ...
0
votes
1
answer
39
views
automake gives the error ".la: file not recognized: file format not recognized"
I want to use a library created by libtool in an autoconf subproject but I get:
$ make
[...]
gcc -g -O2 -o test test.o liba/liba.la
liba/liba.la: file not recognized: file format not recognized
...
0
votes
1
answer
107
views
How to successfully run make install without root privileges
I'm trying to package an RPM of a systemd service written in C and managed by autoconf and autotools. I've learned that I should not build programs as root, which means that I should run make instead ...
0
votes
1
answer
45
views
How to package an RPM with an old autoconf/automake project
I'm trying to package an RPM of a systemd service written in C and managed by autoconf and autotools. When I attempt to package an RPM using the sudo make rpm command as instructed in the project's ...
0
votes
1
answer
27
views
share AC_DEFINE trough AC_CONFIG_SUBDIRS in autoconf
I have two progrects using autoconf. Project A uses project B through AC_CONFIG_SUBDIRS()
project A configure.ac:
AC_CONFIG_SUBDIRS([projectb])
project B configure.ac:
AC_DEFINE([NEWDEFINE])
I ...
1
vote
1
answer
56
views
How to correctly use both Doxygen and GNU Autotools together
I wish to use the GNU build system to automatically compile C++ documentation with Doxygen and then install the resulting html and PDF. I found the following m4 script (ax_prog_doxygen) that is ...
0
votes
1
answer
28
views
Autotools: If I only change the installation directory do I need to rebuild everything? If not how can I avoid this
I build a C++ code with autotools i.e. ./configure && make && make install, but now I want to change the directory where the code installs so I should do ./configure --prefix=${...
0
votes
1
answer
44
views
automake -- SUBDIRS -- "No such file or directory"
I am using autoconf/automake for my build system. So far it has been working just fine. However, I want to split some code out into another lib that I will be loading dynamically from within my main ...
0
votes
2
answers
40
views
Makefile.am: How to list all files (of specific extension) in `foo_HEADERS`?
In a Makefile.am, there is the following rule that mentions all *.h files in that specific folder (several hundreds of them):
foo_HEADERS = file1.h file2.h ...
As the project evolves, new header ...
0
votes
0
answers
194
views
cross compile libcurl to run on ios simulator
I need to cross compile libcurl so that I can use its API from within an iOS app running on the Xcode iOS simulator. I have a simple app in swift that calls out to a C driver function, which then ...
0
votes
0
answers
29
views
Where does cmake store the results of the environment tests that it performs at the beginning of each configure? [duplicate]
Cmake has the configure_file function to perform an operation similar to autotools' configure script processing foo.h.in into a foo.h, that contains macros describing relevant parameters of the ...
0
votes
1
answer
71
views
Apart from complexity, are there technical barriers to have a "crossplatform autotools"? [closed]
I'm asking out of curiosity. If this kind of question is not welcome, please let me know.
I am aware of the autotools stack and its problems, but one major, albeit theoretical benefit of them is that ...
1
vote
0
answers
52
views
How to make customized release on gitlab?
I am trying to setup the automatic generation of a nightly release on a (public) gitlab instance. The project uses the GNU Autotools and the release I want to publish is the tarball generated by make ...
0
votes
1
answer
102
views
Termux autotools/libtool cannot determine link -lib interface
I'm using Termux for Android 12. I've got a simple C project using autotools. I run:
autoreconf -i
./configure
And it fails saying:
checking the archiver (link -lib) interface... unknown
configure: ...
0
votes
1
answer
116
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
0
answers
43
views
Autoconf macro to check if gcc-multilib is present (if gcc can compile 32bit code)
A C-project uses GCC to produce 32-bit objects. To that end, a user building the project in a 64-bit host machine is required to have multilib enabled (e.g. in Unbuntu, apt install gcc-multilib).
What ...
0
votes
1
answer
300
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
449
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, " << &...
1
vote
0
answers
58
views
Automake fails to detect header, despite specifying include dir
I am relatively new to GNU AutoTools but was put on a large C/C++ project that uses it. My role is to fork and implement an experimental feature for this project. Edit: Link is there if you would like ...
1
vote
1
answer
49
views
Linux shared object version scheme
In Linux, every shared object filename has libfoo.so.X.Y.Z scheme, with symbolic link libfoo.so.X -> libfoo.so.X.Y.Z, and symbolic link libfoo.so -> libfoo.so.X usually coming from devel package....
0
votes
0
answers
1k
views
checking host system type... Invalid configuration `x86_64-unknown-linux-gnu': machine `x86_64-unknown' not recognized
./configure gives me the following error upon compilation attempt:
loading cache ./config.cache
checking host system type... Invalid configuration `x86_64-unknown-linux-gnu': machine `x86_64-unknown' ...
0
votes
1
answer
51
views
How to do autotools VPATH builds with Rust
I am working on a library project which mixes C, C++, and Rust code. For historical reasons I use autotools to drive building.
Essentially, my Makefile.am looks like this:
libfoo_la_LIBADD += rustfoo/...
1
vote
0
answers
230
views
How can i make the configure file search for a library in particular directory
I am trying to build the arp-scan tool from source.When i first tried it was missing the library libpcap. So i downloaded the libcap source and build the source successfully.Now i have the library ...
0
votes
1
answer
84
views
How do I convert architecture-based checks to autoconf?
I'm working on trying to convert a project to autoconf which has a hand-written configure script. In this script, there are several occasions where variables are set based on CPU architecture, such as ...
0
votes
1
answer
37
views
Autotools build code and unit tests in a singularity container
The question: Is there a way in autotools to build my code and unit tests without running the unit tests?
I have a code base that uses autotools and running make check compiles the code and runs unit ...
0
votes
0
answers
34
views
how do I use autotools with relative directories for GitLab jobs?
I'm trying to use GNU autotools to configure, make, and install a program. I'm running into problems when I configure and make the program inside a GitLab job. It builds without errors, the problem is ...
1
vote
2
answers
143
views
configure - check for availability of Perl headers (solved)
I'm developing an open source application where I'd like to include Perl conditionally (for different text processing purposes - that's just for information, not to be criticized as a concept :-). How ...
0
votes
1
answer
54
views
Prepending custom dirs ($ZPFX/{include,libs}) to CPP..../LDFLAGS with use of config.site file of autotools?
I'm using a $CONFIG_SITE set to $ZPFX/share/config.site file containing:
CPPFLAGS="-I$ZPFX/include $CPPFLAGS"
LDFLAGS="-L$ZPFX/lib $LDFLAGS"
where $ZPFX variable is my custom user ...
0
votes
0
answers
69
views
Autotools: How to add a shared library .so?
I tried to add my Fortran modules and a shared library (.so) into an extensive library. The code does not complain about the modules. It knows where to find .mod files. However, I do not know what ...
0
votes
1
answer
209
views
Fortran error: (.text+0x0): multiple definition of
I tried to include my Fortran modules in an extensive library that is also written in Fortran. To compile and install this library, the autotools suits are used. I made a Makefile to compile ...
1
vote
1
answer
448
views
error: am__fastdepCXX does not appear in AM_CONDITIONAL
Trying to follow this tutorial I have done my own "Hello World" in c++.
This is the code prueba.cpp:
#include <iostream>
int main()
{
std::cout<<"Hola Mundo"<&...
0
votes
0
answers
48
views
make from autotools does not detect changes in preprocessor directives
I am stuck with a problem for which I searched on various threads unsuccessfully.
I have a project built with autotools utilities. This project relies on preprocessor directives which activate blocks ...
0
votes
1
answer
50
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 ...
1
vote
1
answer
509
views
Is there a reasonable way to pass linker flags though configure and libtool?
Context: I am trying to cross build a library (curl) which uses autotools and libtool using clang, which requires the -target flag for pretty much everything. I set the environment vars, including CC, ...
0
votes
1
answer
95
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 ...
1
vote
1
answer
348
views
Set install path for autotools and conan based project
I want to set install path for autotools and conan based c++ project. I am aware of --prefix which is passed as an argument. I am looking for a field of AutoToolsBuildEnvironment-typed object ...
0
votes
1
answer
642
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
314
views
Bitbake autotools
I have set up a recipe of mine to use autotools to make my project. I recently decided to run bitbake with the verbose output turned on. I noticed nowhere in my build or compilation does autogen.sh ...
1
vote
2
answers
701
views
autoconf: `PKG_CONFIG_PATH` not working in `configure.ac` when using `PKG_CHECK_EXISTS`
I want to check whether gmodule exists in my custom PKG_CONFIG_PATH
// configure.ac
AC_SUBST([PKG_CONFIG_PATH],"./glib/lib/x86_64-linux-gnu/pkgconfig/")
PKG_PROG_PKG_CONFIG
PKG_CHECK_EXISTS([...
3
votes
0
answers
1k
views
Generate compile_commands.json for autotools and conan based c++ project
I have a autotools and conan based c++ project based project and I don't know what has to be done so that compile_commands.json is generated.
In case of cmake and conan based project,
cmake....
0
votes
1
answer
133
views
How to run a command for each subdirectory with a Makefile?
I have the following structure:
├── configure.ac
├── dir1
│ └── Makefile.am
├── dir2
│ └── Makefile.am
├── Makefile.am
...
configure.ac:
AC_INIT([amhello], [1.0], [bug-report@address])
...
0
votes
1
answer
81
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
276
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
522
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
2
answers
251
views
Modifying configure.ac - check for package presence
My main development platform is Gentoo on Linux. However, recently I tried to build my program on the fresh VM install on Debian.
My program contains of main binary and couple of dll/so/dylib ...
1
vote
1
answer
3k
views
Autoconf complains of undefined macro, suggests m4_pattern_allow? what's going on?
I've done a lot of C and some C++ programming, but never used autotools before (I was doing this so long ago, the tools were not yet available to me). Anyway, I'm on Xubuntu 20.04, and I'm following ...
0
votes
1
answer
49
views
Makefile generation wrong? Warning during build
One of my subprojects contains following Makefile.am:
## Process this file with automake to produce Makefile.in
lib_LTLIBRARIES = \
libodbc_lib.la
libodbc_lib_la_SOURCES = \
...
0
votes
0
answers
121
views
Mixing dynamic and static linking with gcc
ALL,
I know static linking is frown upon in *nix world, but...
I made a static library that exports a class and will be used by other (dynamic) libraries.
So, as an example I have foo.a, bar.so and ...