No need to duplicate the host-pkgconf dependency on the Qt case, we
already depend on it in the general case.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
In case the libgcrypt development files are present on the host system,
collectd's ./configure will mistakenly try to use them and will call the
host system's libgcrypt-config, thus leading it to use path to the host
system includes and libraries.
Fix that in two ways:
- explicitly disable libgcrypt support when libgcrypt is not enabled;
- pass the complete path to libgcrypt-config when libgcrypt is enabled.
However, collectd's configure.ac is utterly broken. The code in
configure.ac has special code to check for libgcrypt-config, and use
whatever is provided via --with-libgcrypt=/path/to/libgcrypt-config. But
that is promptly forgotten because they then call the AM_PATH_LIBGCRYPT
macro, that just does it all again from scratch, and does not use the
value previously found.
Instead, we set LIBGCRYPT_CONFIG in the environment and point it to our
own libgcrypt-config.
Should fix numerous build issues:
http://autobuild.buildroot.net/results/ad4/ad408aef5fb92fe9e031c7dbaf6999776b40ace4/http://autobuild.buildroot.net/results/967/96735bfa91bcf2e3dff89f69c0a12ed406e9efb9/
...
http://autobuild.buildroot.net/results/3bd/3bdd9bdffb1d55414787d38fc2656d7a3391a957/
...
(the first two are with the paranoid wrapper, the third one was before
the paranoid wrapper.)
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Romain Naour <romain.naour@openwide.fr>
Cc: Peter Korsgaard <jacmet@uclibc.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Disable run test for pthread detection.
In case of build with only static library, CMake fails to detect the
pthread library (-lpthread), so it falls back trying to link using
-pthread and execute the test program.
<snip>
[...]
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Check if compiler accepts -pthread
CMake Error: TRY_RUN() invoked in cross-compiling mode, please set the following cache variables appropriately:
THREADS_PTHREAD_ARG (advanced)
For details see /home/buildroot/instance-1/output/build/librtlsdr-v0.5.3/TryRunResults.cmake
-- Check if compiler accepts -pthread - no
-- Found Threads: TRUE
-- Udev rules not being installed, install them with -DINSTALL_UDEV_RULES=ON
-- Building with kernel driver detaching disabled, use -DDETACH_KERNEL_DRIVER=ON to enable
-- Building for version: 0.5.3 / 0.5.3
-- Using install prefix: /usr
-- Configuring incomplete, errors occurred!
See also "/home/buildroot/instance-1/output/build/librtlsdr-v0.5.3/CMakeFiles/CMakeOutput.log".
See also "/home/buildroot/instance-1/output/build/librtlsdr-v0.5.3/CMakeFiles/CMakeError.log".
</snip>
Here it fails because, in the CMake FindThreads.cmake file, the
'try_run' function is unconditionally called [1].
Also, the CMakeError.log gives more details why linking with -lpthread
fails:
<snip>
[...]
Run Build Command:"/usr/bin/make" "cmTryCompileExec3012181287/fast"
make[1]: Entering directory '/home/buildroot/instance-1/output/build/librtlsdr-v0.5.3/CMakeFiles/CMakeTmp'
/usr/bin/make -f CMakeFiles/cmTryCompileExec3012181287.dir/build.make CMakeFiles/cmTryCompileExec3012181287.dir/build
make[2]: Entering directory '/home/buildroot/instance-1/output/build/librtlsdr-v0.5.3/CMakeFiles/CMakeTmp'
/home/buildroot/instance-1/output/host/usr/bin/cmake -E cmake_progress_report /home/buildroot/instance-1/output/build/librtlsdr-v0.5.3/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec3012181287.dir/CheckFunctionExists.c.o
/home/buildroot/instance-1/output/host/usr/bin/arm-linux-gcc -pipe -Os -static -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTryCompileExec3012181287.dir/CheckFunctionExists.c.o -c /home/buildroot/instance-1/output/host/usr/share/cmake-3.0/Modules/CheckFunctionExists.c
Linking C executable cmTryCompileExec3012181287
/home/buildroot/instance-1/output/host/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec3012181287.dir/link.txt --verbose=1
/home/buildroot/instance-1/output/host/usr/bin/arm-linux-gcc -pipe -Os -static -DCHECK_FUNCTION_EXISTS=pthread_create -static CMakeFiles/cmTryCompileExec3012181287.dir/CheckFunctionExists.c.o -o cmTryCompileExec3012181287 -rdynamic -lpthread -Wl,-Bstatic -lusb-1.0 -Wl,-Bdynamic
/home/buildroot/instance-1/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libpthread.a(init.os): In function `__pthread_initialize_minimal':
init.c:(.text+0x270): undefined reference to `__libc_setup_tls'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTryCompileExec3012181287.dir/build.make:89: recipe for target 'cmTryCompileExec3012181287' failed
make[2]: *** [cmTryCompileExec3012181287] Error 1
make[2]: Leaving directory '/home/buildroot/instance-1/output/build/librtlsdr-v0.5.3/CMakeFiles/CMakeTmp'
Makefile:118: recipe for target 'cmTryCompileExec3012181287/fast' failed
make[1]: *** [cmTryCompileExec3012181287/fast] Error 2
make[1]: Leaving directory '/home/buildroot/instance-1/output/build/librtlsdr-v0.5.3/CMakeFiles/CMakeTmp'
Determining if compiler accepts -pthread returned PLEASE_FILL_OUT-FAILED_TO_RUN instead of 2. The compiler had the following output:
Change Dir: /home/buildroot/instance-1/output/build/librtlsdr-v0.5.3/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTryCompileExec1361818630/fast"
make[1]: Entering directory '/home/buildroot/instance-1/output/build/librtlsdr-v0.5.3/CMakeFiles/CMakeTmp'
/usr/bin/make -f CMakeFiles/cmTryCompileExec1361818630.dir/build.make CMakeFiles/cmTryCompileExec1361818630.dir/build
make[2]: Entering directory '/home/buildroot/instance-1/output/build/librtlsdr-v0.5.3/CMakeFiles/CMakeTmp'
/home/buildroot/instance-1/output/host/usr/bin/cmake -E cmake_progress_report /home/buildroot/instance-1/output/build/librtlsdr-v0.5.3/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec1361818630.dir/CheckForPthreads.c.o
/home/buildroot/instance-1/output/host/usr/bin/arm-linux-gcc -pipe -Os -static -o CMakeFiles/cmTryCompileExec1361818630.dir/CheckForPthreads.c.o -c /home/buildroot/instance-1/output/host/usr/share/cmake-3.0/Modules/CheckForPthreads.c
Linking C executable cmTryCompileExec1361818630
/home/buildroot/instance-1/output/host/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec1361818630.dir/link.txt --verbose=1
/home/buildroot/instance-1/output/host/usr/bin/arm-linux-gcc -pipe -Os -static -static CMakeFiles/cmTryCompileExec1361818630.dir/CheckForPthreads.c.o -o cmTryCompileExec1361818630 -rdynamic -pthread
make[2]: Leaving directory '/home/buildroot/instance-1/output/build/librtlsdr-v0.5.3/CMakeFiles/CMakeTmp'
make[1]: Leaving directory '/home/buildroot/instance-1/output/build/librtlsdr-v0.5.3/CMakeFiles/CMakeTmp'
</snip>
While falling back on -pthread is correct when using only static
libraries to get some tls-related macros defined [2,3], it is wrong to
try to run the test program in case of cross-compilation.
So, this patch only disable run test when pthread support is done using
-pthread, i.e. in case of the type of libraries is "static only".
Fixes:
http://autobuild.buildroot.org/results/26c/26cb8c2e5f867d49451f61304bf0a1a6f7b825d9/
[1] http://www.cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/FindThreads.cmake;h=a0bc4d133eb3f9d3ae096f0e03e419ef7be66ce8;hb=HEAD#l84
[2] http://lists.busybox.net/pipermail/buildroot/2014-June/100690.html
[3] http://stackoverflow.com/questions/23250863/difference-between-pthread-and-lpthread-while-compiling
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Cc: Baruch Siach <baruch@tkos.co.il>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
The Makefile is hardcoded for /usr/include/ncurses, so override it.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Reported-by: Romain Naour <romain.naour@openwide.fr>
Changeset f1d3e09 (Build shared libraries only as the default) broke the
nmap package.
nmap builds an internal version of libdnet, and tries to statically link
against it. Of course, this breaks for shared-only builds, since in that
case there is no static lib ever built.
Using an external libdnet is not really an option:
- libdnet comes from dnprogs, from the linux-decnet project;
unfortunately, their build-system is not amenable to
cross-compilation, and is a real pain to deal with;
- nmap's bundled libdnet is anyway heavily modified, which precludes
using an external libdnet.
Fix that by considering libdnet to be a purely internal library, and by
configuring it with --enable-static, always.
nmap's ./configure uses AC_CONFIG_SUBDIRS() to configure the libdnet
sub-directory; AC_CONFIG_SUBDIRS() calls ./configure in all the
sub-directories it is passed as arguments. Unfortunately, it is not
possible to specify extra ./configure arguments whith AC_CONFIG_SUBDIRS.
We are using an autoconf trick, which is, when configuring
sub-directories with AC_CONFIG_SUBDIRS(), it will first try to execute
configure.gnu if it exists, before it fallbacks to running plain
configure. See:
https://www.gnu.org/software/autoconf/manual/autoconf.html#Subdirectories
So, we provide a configure.gnu that is just a wrapper around the real
configure, which sole purpose is to append --enable-static when calling
the real configure.
Note1: since this libdnet is considered a purely internal library, we
also always pass --disable-shared, since it is not needed at all.
Note2: since this libdnet is considered a purely internal library, it
should not be exposed to other packages, and thus nmap does not install
it, neither in target nor in staging, neither static nor shared, which
is what we want.
[Peter: explain why post-patch hook is used]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Romain Naour <romain.naour@openwide.fr>
Acked-by: Romain Naour <romain.naour@openwide.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Since the refactoring of the type of libraries in the target filesystem,
these options belong to a choice, and the default is "shared only".
The former option BR2_PREFER_STATIC_LIB has been moved in the legacy
menu, and only selects the BR2_STATIC_LIBS ("static only") option.
However, because BR2_STATIC_LIBS belongs to a choice, when
BR2_PREFER_STATIC_LIB is selected, it does not affect the choice.
So, existing Buildroot configurations, which have BR2_PREFER_STATIC_LIB
set, will silently end with BR2_SHARED_LIBS ("shared only") enabled.
So, the backward compatibility is not kept.
Besides, the legacy BR2_PREFER_STATIC_LIB option does not select
BR2_LEGACY, so the user is not notified of this legacy option, and the
build silently continues with some undesired changes.
This patch removes the inefficient BR2_STATIC_LIBS selection, correctly
selects the BR2_LEGACY option and extend the help message so the user
can easily know how to update his/her Buildroot configuration.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Changeset f1d3e09 (Build shared libraries only as the default) broke the
berkeleydb package.
For some reason, we had a very strange post-configure action in bdb:
$(SED) 's/\.lo/.o/g' $(@D)/build_unix/Makefile
This means that it is using non-libtool object files. This breaks
building shared-only.
This code has been present almost the whole time we've had a berkeleydb
package, that is:
- November 2003: use a sed expression instead of perl
- March 2003 : use a perl program
- August 2002 : introduce berkeleydb
Getting rid of this sed expression fixes the build, and allows building
the three new static/shared combinations: static only, shared only,
both static and shared.
Fixes numerous build failures:
http://autobuild.buildroot.net/results/b41/b41e13ec6c13830667770b3731f8990062f202bd/http://autobuild.buildroot.net/results/925/925433ef505b190aa5ac83c23e9359afe4b21829/http://autobuild.buildroot.net/results/9af/9afa0dd835af079411a2ea5d94e5e4db7c993111/
...
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Peter Korsgaard <jacmet@uclibc.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Erlang/OTP 17.4 is a service release on the 17 track with mostly bug
fixes, but it does contain a number of new features and characteristics
improvements as well.
Some highlights of the release are:
- eldap: Nearly all TCP options are possible to give in the
eldap:open/2 call.
- ssh: Added API functions ptty_alloc/3 and ptty_alloc/4, to allocate a
pseudo tty.
- ssl: Handle servers that may send an empty SNI extension to the client.
Signed-off-by: Frank Hunleth <fhunleth@troodon-software.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Other init scripts in Buildroot use start()/stop() instead of
do_start()/do_stop(), so change it here as well for consistency
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Other init scripts in Buildroot use start()/stop() instead of
do_start()/do_stop(), so change it here as well for consistency
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Other init scripts in Buildroot use start()/stop() instead of
do_start()/do_stop(), so change it here as well for consistency.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Now that we have more options in terms of static/shared libraries,
switch from the existing default of building both shared and static
libraries to building shared libraries only (of course only on
platforms that support shared libraries).
Building both shared and static takes time (since the shared objects
must be built with -fPIC, while static objects are generally built
without, as -fPIC has some performance impact) and consumes a little
bit more disk space.
For example, a static+shared build of libglib2 takes 1 minutes and 59
seconds, with a final build directory of 96 MB. A shared-only build of
libglib2 takes only 1 minutes and 31 seconds (almost a 25% reduction
of the build time), and the final build directory weights 89 MB (a
reduction of almost 8%).
So, switching to a shared library only build brings some useful build
time and build size benefits.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Now that we have clear options for the three cases of shared only,
static only and shared+static, let's use them in ncurses to pass the
appropriate --{with,without}-{shared,normal} options.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
This commit turns the single static option into a choice, which offers
various possibilities:
1. Build and use static libraries only;
2. Build both shared and static libraries, but use shared libraries;
3. Build and use shared libraries only.
On most platforms, (2) is currently the default, and kept as the
default in this commit. Of course, on certain platforms (Blackfin,
m68k), only option (1) will be available.
In addition to the introduction of the Config.in options, this commit
also:
* Removes the 'select BR2_STATIC_LIBS' from 'BR2_BINFMT_FLAT', since
with the use of a choice, we are guaranteed that BR2_STATIC_LIBS
will be selected when the binary format is BR2_BINFMT_FLAT, since
BR2_STATIC_LIBS will be the only possible solution in the choice.
* Changes package/Makefile.in to use the proper
--{enable,disable}-{shared,static} options for autotools packages.
[Thomas: remove useless empty newline right after 'choice'. Noticed by
Yann E. Morin.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
[Thomas:
- add BR2_USE_MMU dependency, since fork() is used
- rename do_start() and do_stop() to just start() and stop(), as we
do in most init scripts in Buildroot.]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
In some cases, upstream just update their releases in-place, without
renaming them. When that package is updated in Buildroot, a new hash to
match the new upstream release is included in the corresponding .hash
file.
As a consequence, users who previously downloaded that package's tarball
with an older version of Buildroot, will get stuck with an old archive
for that package, and after updating their Buildroot copy, will be greeted
with a failed download, due to the local file not matching the new
hashes.
Also, an upstream would sometime serve us HTML garbage instead of the
actual tarball we requested, like SourceForge does from time for as-yet
unknown reasons.
So, to avoid this situation, check the hashes prior to doing the
download. If the hashes match, consider the locally cached file genuine,
and do not download it. However, if the locally cached file does not
match the known hashes we have for it, it is promptly removed, and a
download is re-attempted.
Note: this does not add any overhead compared to the previous situation,
because we were already checking hashes of locally cached files. It just
changes the order in which we do the checks. For the records, here is the
overhead of hashing a 231MiB file (qt-everywhere-opensource-src-4.8.6.tar.gz)
on a core-i5 @2.5GHz:
cache-cold cache-hot
sha1 1.914s 0.762s
sha256 2.109s 1.270s
But again, this overhead already existed before this patch.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Peter Korsgaard <jacmet@uclibc.org>
Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Instead of repeating the check in our download rules, delegate the check
of the hashes to the download wrapper.
This needs three different changes:
- add a new argument to the download wrapper, that is the full path to
the hash file; if the hash file does not exist, that does not change
the current behaviour, as the existence of the hash file is checked
for in the check-hash script;
- add a third argument to the check-hash script, to be the basename of
the file to check; this is required because we no longer check the
final file with the final filename, but an intermediate file with a
temporary filename;
- do the actual call to the check-hash script from within the download
wrapper.
This further paves the way to doing pre-download checks of the hashes
for the locally cached files.
Note: this patch removes the check for hashes for already downloaded
files, since the wrapper script exits early. The behaviour to check
localy cached files will be restored and enhanced in the following
patch.
[Thomas: fix minor typo in comment.]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Peter Korsgaard <jacmet@uclibc.org>
Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Instead of repeating the same test again and again in all our download
rules, just delegate the check for an already downloaded file to the
download wrapper.
This clears up the path for doing the hash checks on a cached file
before the download.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Peter Korsgaard <jacmet@uclibc.org>
Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Instead of relying on argument ordering, use actual options in the
download wrapper.
Download backends (bzr, cp, hg...) are left as-is, because it does not
make sense to complexify them, since they are almost very trivial shell
scripts, and adding option parsing would be really overkill.
This commit also renames the script to dl-wrapper so it looks better in
the traces, and it is not confused with another wrapper.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
For the host variant of packages, we normally only build the shared
libraries. However, ncurses uses non-standard options to select
between shared/static and therefore the host variant was building both
of them, even though the static libraries were unused.
By passing --without-normal, we disable the build of static
libraries. It saves a bit of disk space, and on my laptop,
host-ncurses takes 26 seconds to build instead of 40 seconds.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
As noted by Yann E. Morin, those dependencies are unneeded, since FLAT
can anyway only be used on m68k and Blackfin.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
In preparation for the refactoring of the static/shared library
support, we add a BR2_BINFMT_SUPPORTS_SHARED hidden option that binary
formats supporting shared libraries should select.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Currently, the binary format choice is only shown for the Blackfin and
m68k architectures, since we assume that all other architectures are
using the ELF binary format. However, due to this, the BR2_BINFMT_ELF
symbol is in fact not set to 'y' for those architectures that use the
ELF format.
This will be causing problems for the refactoring of the static/shared
library support, as we will need to know if the binary format supports
shared libraries or not.
Therefore, we simply make the choice visible on all architectures,
even if it means that on many architectures no other choice than ELF
will be available.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
The current binfmt selection in arch/Config.in allows to select FDPIC
on m68k, which is incorrect. This commit fixes that, and makes sure
FDPIC is the default on Blackfin, while FLAT is the default on m68k.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>