bmake stuck and not progress (upon building pkg-config) - pkg-config

Upon building a component (pkg-config) under pkgsrc directory, I get stuck being told checking for a compliant posix_memalign() implementation... as in the trace below. CPU remains 99% and doesn't seem to progress for a few hours. Any ideas what could be wrong is appreciated.
To install pkgsrc, I followed Bootstrap instruction here, using HEaD_650. Precise commands since installing pkgsrc until where I got stuck:
# uname -a
QNX localhost 6.5.0 2012/06/20-13:50:59EDT x86pc x86
# svn checkout --username <username> http://community.qnx.com/svn/repos/pkgsrc/HEAD_650
# cd pkgsrc/bootstrap && ./bootstrap
# cd ../devel/pkg-config
# pwd
/usr/share/pkgsrc/devel/pkg-config
# bmake
:
checking for fd_set... yes, found in sys/select.h
checking whether realloc (NULL,) will work... yes
checking for nl_langinfo (CODESET)... no
checking for nl_langinfo (PM_STR)... no
checking for nl_langinfo (_NL_CTYPE_OUTDIGITn_MB)... no
checking for a compliant posix_memalign() implementation...
Using QNX6.5.0 SDP1
(By the way, I'm not sure if the way I'm doing above is the right to way to get pkg-config on QNX in general.)

Figured out based on the workaround suggested in this link.
I did the following:
# pwd
/usr/share/pkgsrc/devel/pkg-config
# export MALLOC_BAND_CONFIG_STR="8:16,32,0:24,32,0:32,32,0:48,24,0:64,24,0:80,24,0:96,16,0:128,8,0"
# bmake (this finishes this time)

Related

compilation of binutils-gdb can't find ncurses

I'm trying to compile the binutils for the i686-elf target according to this tutorial:
https://wiki.osdev.org/GCC_Cross-Compiler
I just added the --enable-tui option, so that I have the support in the gdb.
I did the following:
# get sources
git clone git://sourceware.org/git/binutils-gdb.git
# store settings
export PREFIX="`pwd`/opt/cross"
export TARGET=i686-elf
export PATH="$PREFIX/bin:$PATH"
# create build folder
mkdir build-binutils
cd build-binutils
# run configure
../binutils-gdb/configure -target=$TARGET --prefix="$PREFIX" --with-sysroot --disable-nls --disable-werror --enable-tui
# make
make
This runs for some time and terminates with the following error:
checking for library containing socketpair... (cached) none required
checking for ld used by GCC... (cached) ld
checking if the linker (ld) is GNU ld... (cached) yes
checking for shared library run path origin... (cached) done
checking for iconv... (cached) yes
checking for iconv declaration... (cached)
extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
checking for library containing waddstr... (cached) no
configure: error: no enhanced curses library found; disable TUI
make[1]: *** [Makefile:11329: configure-gdb] Error 1
make[1]: Leaving directory '/home/noexpandtab/dev/build-binutils'
make: *** [Makefile:853: all] Error 2
For me it seems, that the ncurses library cannot be found.
I have a Debian 10 running and installed the following additional packages:
libncurses-dev
ncurses-base
ncurses-doc
libncurses5-dev
Do I have to install additional packages? Or am I missing some options for the configure script?
You're cross-compiling to a different architecture (i686-elf) than whatever you're running on—the $TARGET mentioned in the question. gdb will have to be linked with libraries which are built for that architecture.
Debian provides ncurses packages which run on the current architecture, but does not provide a suitable package for the cross-compiled application. So you get to do this for yourself.
When cross-compiling ncurses, you'll have to keep in mind that part of it builds/runs on the current architecture (to generate source-files for compiling by the cross-compiler). That's defined in the environment as $BUILD_CC (rather than $CC), as you might see when reading the script for the mingw cross-compiling. There's a section in the INSTALL file (in the ncurses sources) which outlines the process.
There's no tutorial (that would be off-topic here anyway), but others have read the instructions and cross-compiled ncurses as evidenced by a recent bug report.
I retried the whole compilation, and suddenly it works! I tested a bit and I assume I found my fault: I executed configure without --enable-tui, where make worked. Then I executed configure with --enable-tui in the same folder without cleaning it. After cleaning or running in a new folder it compiled.
Thanks to the one user who posted to delete the contents of opt/cross. (The comment itself was already somehow deleted in between.) This wasn't the solution, but leaded me in the right direction.
TL;DR: Clean the build folder before running configure with different parameters again.

Ruby build failed with rbenv - cannot locate make?

I have just wasted 2 days of my life trying to figure this out, and I need some help please!
I am a complete noob to ruby, and all I want to do is install octopress so that I can have a blog. I think I messed up my mac dev environment somehow - when I try to install ruby with rbenv, it fails and tells me that it cannot find make? How do I fix this?
Thanks for your help in advance.
Mike
Installing ruby-2.4.0...
BUILD FAILED (OS X 10.12.3 using ruby-build 20170201)
Inspect or clean up the working tree at /var/folders/d7/xhd01lr92rvglw0vw9hzkx1m0000gn/T/ruby-build.20170214143528.84918
Results logged to /var/folders/d7/xhd01lr92rvglw0vw9hzkx1m0000gn/T/ruby-build.20170214143528.84918.log
Last 10 log lines:
checking for sigsetjmp as a macro or function... yes
checking for setjmp type... _setjmp
checking for prefix of external symbols... _
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking if make is GNU make... ./configure: /usr/local/bin/make: /usr/local/opt/ruby/bin/ruby: bad interpreter: No such file or directory
no
checking for safe null command for make... configure: error: no candidate for safe null command
/usr/local/bin/ruby-build: /usr/local/bin/make: /usr/local/opt/ruby/bin/ruby: bad interpreter: No such file or directory
Here is the output of the following commands:
$ which ruby
/usr/bin/ruby
head /usr/local/bin/make
#!/usr/local/opt/ruby/bin/ruby
#
# This file was generated by RubyGems.
#
# The application 'make' is installed as part of a gem, and
# this file is here to facilitate running it.
#
require 'rubygems'
And here is the output of echo $PATH:
/Users/michaelhenry/.rbenv/shims:/Users/michaelhenry/.rbenv/bin:/usr/local/bin:/Users/michaelhenry/.rbenv/shims:/Users/michaelhenry/.rbenv/bin:/usr/local/Cellar/coreutils/8.26/libexec/gnubin:/usr/local/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Frameworks/Mono.framework/Versions/Current/Commands

(Configuring Bitcoin core) configure: error: libdb_cxx headers missing

I've downloaded Bitcoin core from Github and am trying to set it up via instructions from Andreas Antonopoulos Bitcoin book Mastering Bitcoin Chapter 3 (The Bitcoin client)
Currently stuck on the configure step, when I run ./configure everything is looking good till it ends with the following error:
...
checking for stdio.h... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for strings.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for sys/stat.h... (cached) yes
checking for MSG_NOSIGNAL... no
checking for Berkeley DB C++ headers... no
configure: error: libdb_cxx headers missing
I'm using homebrew, how do I fix this error?
Ah figured it out, I didn't completely finish reading all the instructions in the build-osx.md file
#### Installing berkeley-db4 using Homebrew
The homebrew package for berkeley-db4 has been broken for some time. It will install without Java though.
Running this command takes you into brew's interactive mode, which allows you to configure, make, and install by hand:
```
$ brew install https://raw.github.com/mxcl/homebrew/master/Library/Formula/berkeley-db4.rb -–without-java
```
These rest of these commands are run inside brew interactive mode:
```
/private/tmp/berkeley-db4-UGpd0O/db-4.8.30 $ cd ..
/private/tmp/berkeley-db4-UGpd0O $ db-4.8.30/dist/configure -- prefix=/usr/local/Cellar/berkeley-db4/4.8.30 --mandir=/usr/local/Cellar/berkeley-db4/4.8.30/share/man --enable-cxx
/private/tmp/berkeley-db4-UGpd0O $ make
/private/tmp/berkeley-db4-UGpd0O $ make install
/private/tmp/berkeley-db4-UGpd0O $ exit
```
After exiting, you'll get a warning that the install is keg-only, which means it wasn't symlinked to /usr/local. You don't need it to link it to build bitcoin, but if you want to, here's how:
$ brew --force link berkeley-db4
brew install berkeley-db4
then
brew link berkeley-db4 --force
worked for me. not the ones proposed here
This is what worked for me:
sudo apt install libdb5.3++ libdb5.3++-dev
For those who uses fedora like me
sudo dnf install libdb-cxx-devel
and it may give warning about incompatible libdb version, you can ignore that with
./configure --with-incompatible-bdb

error installing libtorrent with boost

on Lubuntu 14.04 64 bit, I am getting this configure error when I try to install de libtorrent library:
checking for boostlib >= 1.35... yes
checking whether the Boost::System library is available... yes
checking for exit in -l/usr/local/boost_1_57_0/bin.v2/libs/system/build/gcc-4.8/release/threading-multi/... no
checking for exit in -lboost_system-/usr/local/boost_1_57_0/bin.v2/libs/system/build/gcc-4.8/release/threading-multi/... no
configure: error: Could not link against boost_system-/usr/local/boost_1_57_0/bin.v2/libs/system/build/gcc-4.8/release/threading-multi/ !
I executed this:
alberto#alberto-virtual-machine:~/trabajo/libtorrent-rasterbar-0.14.7$ ./configure --with-boost-system=/usr/local/boost_1_57_0/bin.v2/libs/system/build/gcc-4.8/release/threading-multi
there are this files on the directory:
alberto#alberto-virtual-machine:~/trabajo/libtorrent-rasterbar-0.14.7$ ls /usr/local/boost_1_57_0/bin.v2/libs/system/build/gcc-4.8/release/threading-multi/
error_code.o libboost_system.so.1.57.0
I haven't much idea about static libraries, could someone help me please? thank you.
The argument --with-boost-system takes either:
A library name suffix (like mt, which some distros use)
A full path including the library name
You did not pass in a full path with the library name, so the configure script interprets it as (1) and it fails to link against that library. Instead, try:
./configure --with-boost-system=/usr/local/boost_1_57_0/bin.v2/libs/system/build/gcc-4.8/release/threading-multi/libboost_system.so

configure: error: C compiler cannot create executables with Mavericks

I've checked stackoverflow but haven't found an answer yet.
I'm trying to install wget on Mavericks as shown here.
Here's what I'm getting:
bolo:wget-1.14 Michelin$ subl config.log
bolo:wget-1.14 Michelin$ ./configure --with-ssl=openssl
configure: configuring for GNU Wget 1.14
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... build-aux/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... no
checking build system type... i386-apple-darwin13.0.0
checking host system type... i386-apple-darwin13.0.0
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/Users/Michelin/Downloads/wget-1.14':
configure: error: C compiler cannot create executables
See `config.log' for more details
My config.log:
https://gist.github.com/bolom/7552389
Other thing I have installed Command Line tools BUT I don't the assembler :(
B.
Below solved this for me in Mavericks. I had to use sudo for this to work.
From https://trac.macports.org/wiki/ProblemHotlist
Xcode License Agreement
When attempting to build a port which compiles an OS X app (e.g., gimp-app), the compilation may fail with an xcodebuild error. One of the possible causes of this is that an initial run of xcodebuild from the terminal may be needed to accept the EULA before any compilation can proceed. Run:
xcodebuild -license
from a terminal window and follow the prompts. After accepting the EULA, rebuild the port again.
With some ports and some versions of Xcode (e.g. libunwind-headers with Xcode 4.4+) you may need to accept the license as root, i.e.:
sudo xcodebuild -license
This will need to be repeated after any Xcode upgrade.
i'd suggest using homebrew (http://brew.sh/) to install wget:
brew install wget
an additional note for others out there: upgrading your command line tools for Mavericks is easy like this: http://www.computersnyou.com/2025/
I came across the same issue when working with Mac Ports for the first time.
When you newly install Xcode and command line tools, there's a license agreement you have to agree to first before the tools (and indeed Xcode) actually work.
Bring up a terminal session and type "ac" (no quotes)
You will be prompted to accept the license agreement. Page down and enter 'agree' at the end.
You should then be good too go!
Compiles worked for me from that point on.
Cheers

Resources