qt,osx-yosemite,thrift,autotools
Ok. It seems the pkg-config installed on my machine was not brew installed pkg-config. So, uninstalled and installed pkg-config using brew. This resolved the above issue. After that, I also found that automake installed on my machine was 1.15 and I need automake 1.12 to install thrift 0.9.0.
gcc,shared-libraries,ld,autotools,libusb-1.0
The .so file is built in libusb/.libs/ Its not very obvious by looking at the build logs though.
autotools,glib,automake,gobject
You should start by looking at the error carefully: collect2: error: ld returned 1 exit status This tells you it's a linker error (ld is the linker). src/.libs/libfoobar.so: undefined reference to `g_intern_static_string' The linker cannot find a symbol in src/.libs/libfoobar.so (a shared library) which you are linking to your test...
static-libraries,autotools,automake
It might be easier to do something like this than to use libtool since you're basically just adding a few object files to the original static lib. In this example, I'm assuming WRAPPER_LDFLAGS is the static lib you want to add objects to (e.g. ../../../external/xerces-c-3.1.1-x86_64-linux-gcc-3.4/lib/libxerces-c.a): lib_LIBRARIES = lib_xml_wrapper.a # List...
_LDFLAGS isn't valid for a static library, only for an executable or a shared library. You may want _LIBADD instead. It seems to me that the error message could be improved.
If you're sticking with a recursive directory structure, you can control the order of descent with the SUBDIRS variable. This is fine for things like separate library and test directories; the "Recursive Make Considered Harmful" catch-all overstates the case. In this case, though, it's sound advice. You obviously realise this...
WHATS HAPPENS: To resolve "common.h" not being found issue for foobar.tar I've added EXTRA_DIST = common/common.h foo/foo.h bar/bar.h to the top Makefile.am. After that, the command ./bootstrap && ./configure && make dist will include *.h files into foobar-0.1.tar.gz. Next, ./bootstrap && ./configure && make distcheck fails with Makefile:204: ../common/.deps/foo-common.Po: No...
It seems my issue is with the libretto_la_LDFLAGS line. Leaving that out and using make install gives both the .a and .so files in the prefix specified.
You're not supposed to write rules which depend on the order things are listed in the Makefile. There's no reason to have this rule at all (I understand it's a direct translation of your old Makefile -- which was also wrong): all-local: header.csv.h because header.csv.h is not a build product...
You didn't say how you configured or the exact command you used for make install. This matters for two reasons: Automake supports renaming files at install time via configure's --program-prefix and related options; Automake supports setting DESTDIR at installation-time. So maybe one of these is having an effect. Fixing the...
The solution is actually quite simple nodist_foobar_SOURCES = foobar.c BUILT_SOURCES = foobar.c This way automake knows that foobar.c is generated at build time, and since it's in nodist_ it won't be redistributed. Although depending on what kind of string you're talking about a common way to solve it is to...
linux,windows,makefile,mingw,autotools
You should add the check to your configure.ac, something like this: AC_CANONICAL_HOST case $host_os in *mingw*) mingw=true ;; *) mingw=false ;; esac AM_CONDITIONAL([MINGW], [test x$mingw = xtrue]) Then in Makefile.am, you can do if MINGW AM_LDFLAGS += -lws2_32 AM_LDFLAGS += -Xlinker --allow-multiple-definition endif Make sure you don't indent the body...
This isn't possible as far as I know. autogen is a strange beast; the files it creates are necessary to build the project (configure and Makefile.am). That means autogen is more part of the "unpack sources" than the "compile source code into product" step. After you have run autogen, you...
Define the string as an M4 macro: m4_define([FOOBAR_HELP_STR], [Turn on the foobar features]) AC_ARG_ENABLE([foobar], [AS_HELP_STRING([--enable-foobar], [FOOBAR_HELP_STR])]) ...
autoconf generates the configure script from various input files, some of which are created using other tools like aclocal, automake, etc. autoreconf is a helper that knows how to call all these tools in the right order You'll usually just call autoreconf yourself and let it deal with all the...
osx,shell,macports,autotools,m4
GNU Autotools does not support execution over a working directory stored on a FAT32 file system. It results in spurious m4trace debug messages being output to the generated configure script. It is unknown why this is, but may be related to the reliance on the sleep command to check whether...
gcc,tesseract,autotools,libtool
I followed this thread and turn to compile tesseract 3.03.03, it compiles OK so far. I will continue update my progress.
autoreconf isn't magic (though I encounter package maintainers who obviously believe this). When you ran autoreconf, it failed to find the AX_CHECK_COMPILE_FLAG macro, and produced a corrupt configure script. Usually that produces an error/diagnostic message at the same time. 'AX_CHECK_COMPILE_FLAG` comes from the autoconf archive project, and Debian has a...
Just use sudo apt-get install binutils make csh g++ sed gawk autoconf automake autotools-dev ...
Remove -lssl -lcrypto from the LDFLAGS for your libraries; the way the link editor works, LDFLAGS are passed before the object files, and that means they are discarded; in at least some version of the link editor, the libraries passed before object files are also "blacklisted", or to be precise,...
All you have to do is add them to the hellworld_SOURCES each file is delimited by a space. AUTOMAKE_OPTIONS = foreign bin_PROGRAMS = helloworld helloworld_SOURCES = hello.c x.c y.c b.c ...
configure,autotools,gperftools
You might try something like this: ./configure --disable-shared CXXFLAGS=-g && make It depends on several factors, including your platform, compiler and gperftools version. You can refer to the documentation here: gperftools README gperftools INSTALL ...
autotools,automake,computer-architecture
Selecting the CPU and OS is better handled in configure.ac, which has AC_CANONICAL_HOST which parses the output from uname and puts it in a standard format: configure.ac ... AC_CANONICAL_HOST WRAPPER_CPPFLAGS="" AS_CASE([$host_os], [linux*], [ WRAPPER_CPPFLAGS="$WRAPPER_CPPFLAGS -DLINUX" AS_CASE([$host_cpu], [x86_64], [ WRAPPER_CPPFLAGS="$WRAPPER_CPPFLAGS -DAMD64 -I../../../external/xerces-c-3.1.1-x86_64-linux-gcc-3.4/include" ], [i?86], [ WRAPPER_CPPFLAGS="$WRAPPER_CPPFLAGS -I../../../external/xerces-c-3.1.1-x86-linux-gcc-3.4/include" ]) ],...
After a bit of searching, I found that I needed to use PKG_CHECK_MODULES as shown below: AC_INIT([myproject], [123], [[email protected]]) PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.3.0]) AC_SUBST([GLIB_CFLAGS]) AC_SUBST([GLIB_LIBS]) AM_INIT_AUTOMAKE AC_PROG_CC AC_OUTPUT([Makefile src/Makefile]) Then the GLIB variables needed to be added to src/Makefile.am: bin_PROGRAMS = helloworld helloworld_SOURCES = main.c helloworld_LDADD = @[email protected] helloworld_CFLAGS =...
You You need to pass the -L option to LDFLAGS, not just a path; I also suggest to pass the variable to ./configure rather than as environment: $ ./configure --prefix="${PWD}/../target/cpp" LDFLAGS="-L${PWD}/../target/cpp/lib" Alternatively, you can pass it to LIBS too, as the search path can be passed in either variables correctly...
You can't do it. Actually, what you are trying to do doesn't really make sense. Static libraries are just archives containing object files and a table of contents. Put simply, you can think of a static library as a .zip containing .o files. The linking phase only takes place when...
gcc,clang,autotools,compiler-options
AM_CXXFLAGS isn't something you should AC_SUBST. It is reserved for use by automake. If you look at the Makefile generated for a C++ target, you will find definitions for CXXCOMPILE and LTCXXCOMPILE, which always include the AM_CXXFLAGS variable. You want to add the (conditional) compiler flag to AM_CXXFLAGS or to...
autotools,autoconf,automake,m4
Unfortunately, you can't substitute Makefile variables like datadir at configure-time, since they aren't fully expanded. (See the documentation here.) The unfortunate solution if you want to do both configure-time and build-time substitutions is to do a two-step substitution, from foo.conf.in.in to foo.conf.in at configure time, and foo.conf.in to foo.conf at...
Replace %.o: %.c with .c.o: That's a suffix rule doing the same thing, and it's more portable. If your rule involves a suffix that is not known to make, list it in the prerequisites for the special .SUFFIXES target: .SUFFIXES: .hack .win .hack.win: # build a .win file from a...
Your configure.ac is almost ok. The only problem is space between AS_IF and the parenthesis. No whitespace is allowed between a macro name and the opening parenthesis in m4 scripts. This is correct syntax: AC_CHECK_HEADER(check.h, [], [ AS_IF(test "$(lsb_release -cs)" = "vivid", [echo aaaaaa], [echo bbbbbb]) ]) If you are...
If you want to conditionally compile something with automake using a regular make command with no arguments, you have to use automake conditionals (the if HAVE_MINI thing you refer to); there is no other way. However, what you can do, alternatively, is to create an extra target (say, build_mini) in...
I went with Brett Hale's comment to use subpackages. I was able to insert : ${CFLAGS="-O0"} before AC_PROG_CC, which sets the appropriate optimization. The other solutions do not work, since the -g -O2 was getting added very last. You can never get another -O variable after it....
c++,makefile,gnu,autotools,tntnet
You can use either Suffix rules or Pattern rules. In your case, both should do the job equally well. The only difference is that Pattern rules are GNU-Make-specific (not compatible with Unix make), though the GNU manual I linked to discourages the use of the Suffix rules, probably because its...
I don't know the original reason why Automake and Autoconf do this, but probably because some people were using this convention in their Makefiles before Automake was written. If you use Automake, then you have to follow this convention. A somethingdir variable has a special meaning, it tells Automake where...
Most simply by putting CFLAGS+=" -std=c11" into your configure.ac (in addition to AC_PROG_CC). configure.ac is a template for a shell script, so you can simply put shell code in it. In fact, all the AC_FOO_BAR m4 macros expand to shell code themselves. Caveat: This will not check whether your compiler...
Out-of-tree building is a feature of Autotools that requires both Autoconf and Automake. Vim and Git both only use Autoconf and not Automake, so they can't take advantage of that feature. As a more general answer to your question: simple Autotools projects should work with out-of-tree builds automatically. When using...
You should not use srcdir as a variable to determine the path to a built object. Use $(top_builddir) instead. To use Makefile variables you need to use brackets either $() or ${}....
build,makefile,autotools,autoconf,automake
As the link says, Makefile.in is the template for Makefile which would just have @[email protected] macros for configure (via AC_CONFIG_FILES) to substitute. If the project is really simple, I can imagine it would work OK without automake. All autoscan and autoheader do is help you build primitive configure.ac and config.h...
I don't think you can do what you seem to want in configure.ac alone. This code: $(shell svnversion -n .) seems to be for when make is actually run. When configure calls AC_OUTPUT all your AC_DEFINEs are written into config.h at that time. Which is before make, so anything written...
c++,c,makefile,autotools,automake
So I have found a workaround, I use a sed to change the Makefile.am during the configure. # Source + dependency. files=`find ./src/ -type f | grep -E '\.h$$|\.hpp$$|\.c$$|\.cpp$$' | sed 's/\/src//g'` sed -i '/.*_SOURCES.*/c\'"$soft"'_SOURCES = '"$files"'' src/Makefile.am It's work fine, when we add sources, we just need to do...
c++,autotools,autoconf,automake
The .so version should always start at 0:0:0. It should not be tied to your project's software version number. Libtool version numbers are referred to as current:revision:age and don't necessarily map to the .so file's suffix on any particular platform. Here is a summary of the explanation given at this...
No, there's not. The point is that you're not rebuilding the sources, you're rebuilding binaries. What you can do is build an intermediate .o consisting only of the shared sources, and then use that in your tests, and binaries....
autoscan is telling you that because gettimeofday is a potential portability issue, you should have a configure check for it. So what you would need to do is add AC_CHECK_FUNCS(gettimeofday) to configure.ac, rerun autoreconf, and then decorate your C code with #ifdef HAVE_GETTIMEOFDAY That's the general process. Personally, I think...