Build glib from source - glib

Good morning, I'm trying to build glib from source, but nevertheless several attempts always get this error:
make[4]: *** No rule to make target `gobject.stp.in', needed by `gobject.stp'. Stop.
I'm using these commands:
./configure --prefix=/opt/gt --with-pcre=internal LIBFFI_CFLAGS=-I/opt/gt/lib/libffi-3.2.1/include LIBFFI_LIBS="-L/opt/gt/lib64 -lffi"
make
someone can help me?

There is a problem with the 2.48.0 tarball; see https://bugzilla.gnome.org/show_bug.cgi?id=763821
You can work around the issue by passing --disable-systemtap to the configure script.

Related

RcppArmadillo undefined symbol: dpotrf_ in Travis build

I have looked at many other posts related to this issue and have tried each solution. None have worked in my case, including copying over the makevars from Rcpp. Anyhow, when building on Travis I get the following error
undefined symbol: dpotrf_’
The interesting note is that the package installs fine on windows, macOS, and linux.
here is my repo R package
I can reproduce the failure on a very standard Debian testing system (which I use for the extensive reverse dependency checks on Rcpp and RcppArmadillo).
After installing packages bain and BFpack (I had the rest) I attempted to build the tar.gz from your pristine just-checked-out sources. And I get:
*** installing help indices
*** copying figures
** building package indices
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘BGGM’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/tmp/Rinst106c6ed5251a/00LOCK-BGGM/00new/BGGM/libs/BGGM.so':
/tmp/Rinst106c6ed5251a/00LOCK-BGGM/00new/BGGM/libs/BGGM.so: undefined symbol: dpotrf_
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/tmp/Rinst106c6ed5251a/BGGM’
-----------------------------------
ERROR: package installation failed
This appears to be a moderately complex and large enough package so please pardon me for not diving in and debugging. I would suggest you simplify with smaller mock packages to see what may be wrong. (dpotrf is a fairly standard LAPACK routine so something somewhere calls it. Maybe you call it explicitly. Maybe you did a Fortran-to-C mapping wrong. Maybe you have something wrong in how you interface with RcppArmadillo. Hard to tell...)
Edit: You committed compiled code and a Windows library. "Don't do that." When Travis builds it also starts from a git checkout as I did. That may be the difference.
Edit 2: It wasn't, but your R code mixes .Call() with generated entry points (ie via RcppExports.cpp and RcppExports.R). I have seen that blow up for other people. That may be something to look into.
Disclaimer: I work with D_Williams, but I figured out the problem, and others may find it useful.
A functioning configure.ac was present, and a Makevars.in is present.
The problem is that the configure file was not yet generated. This is an autotools/autoconf setup. To resolve it, I ran autoconf in the package directory, which generated the configure file. That configure file is then executed when R builds the package. The configure file modifies the Makevars.in and creates Makevars. That Makevars file ultimately defines where to find libraries, includes, compilers, compiler options, etc.
If you do not generate the configure file from configure.ac using autoconf, then there is no configure file to be executed, and no Makevars to define the needed options at compile time. Therefore, the compiler is not fully configured, and it will fail.
TLDR: If you have an configure.ac, you must run autoconf on it, and commit that configure file to your repo. R needs to execute it to have a functioning Makevars.

How can I get eredis to compile?

I am new to the world of erlang and phoenix. Anyways, I am trying to figure out a compiling issue and I have hit wits end for now.
I will do my best to provide as much information as possible to help with this problem. If I've missed anything just let me know.
When running the command mix deps.get everything is compiled properly from my mix.exs.
However, once I run mix conform.configure
I get the error:
==> eredis (compile)
include/eredis_sub.hrl:19: type queue() undefined
** (Mix) Could not compile dependency eredis, /usr/bin/rebar command failed. If you want to recompile this dependency, please run: mix deps.compile eredis
Running mix dep.compile eredis produces the same error as above.
Oh and I am running erlang 18. Any help would be greatly appreciated.
Thanks.
Either use v17, or change to queue:queue().
Use rebar compile instead of make. Makefile of eredis is broken. They are probably using eredis exclusively as subproject and is no longer compiled using make.
And as well update to at least v1.7.0 but preferably v1.0.8.

Compiling C extension with anaconda on Travis-CI missing __log_finite symbol

A C extension module that compiles fine on Travis-CI without anaconda fails when installed with anaconda. It appears to install just fine, but when I try to import it, I get the following error:
ImportError: /home/travis/anaconda/lib/python2.7/site-packages/quaternion/numpy_quaternion.so: undefined symbol: __log_finite
The full error can be seen here. Obviously, this looks like a linker error, where it can't find glibc (which I believe is where __log_finite is found). But why should it fail to find glibc?
When I run nm on that .so file (through Travis), it shows that __log_finite is indeed undefined, but shouldn't it find it through the usual process?
I've tried installing quaternion through pip and I've tried installing it by directly downloading it and running python setup.py install. Both seem to work, in the sense that it looks like all the files are where they should be. But both fail on import because they can't find that symbol.
I've even tried installing the full version of anaconda (rather than just miniconda, which is recommended). Nothing seems to work. How can I make Travis find that symbol, and is this something I'll have to worry about ordinarily with my distribution?
It appears to be a problem with a -ffast-math flag in my quaternion package. One thing that flag does is make the code assume that the numbers are finite, so that instead of using the log function, it uses some log_finite function, which for some reason Travis doesn't have --- or something. Anyway, I have my numba package set an environment variable in Travis builds, which the quaternion package then looks for on installation, and turns off fast-math. This is unfortunate, because it means I'm not actually testing the code as it's actually used. But it means my code builds and tests pass.
There seems to be about one mention of this on the internet. Or not; I can't tell.

homebrew: ngspice not building (x11.c:29:12: fatal error: 'X11/IntrinsicP.h' file not found and then some)

I'm a homebrew newbie (broob?). Trying to build ngspice I encounter the error described in the title. Before I get into that though, it turns out I actually don't even really want/need X11 support at the moment. I'm such a newbie I don't even know how to tell brew to leave out X. In the formula I see:
option "with-x", "Build with X support"
But if I build "--without-x" I still see the same error. How do you say "not --with-x"?
OK, on to the compile trouble:
I can see the file is really there in the X11 directories:
$ find /opt/X11/ -name IntrinsicP.h
/opt/X11//include/X11/IntrinsicP.h
But somehow homebrew is not seeing that include path. What the best way to alert brew to the location of this file? I tried:
ln -s /opt/X11/include/X11 /usr/local/include/X11
which works, in the sense that the include problem goes away, but it produces a linker problem:
ld: library not found for -lXaw
Again, I found some Xaw libs in /opt/X11, but I've not sorted out how to educate homebrew enough to actually link to them. ;-(
$ find /opt/X11/ -name "*Xaw*"
/opt/X11//include/X11/Xaw
/opt/X11//include/X11/Xaw/XawImP.h
/opt/X11//include/X11/Xaw/XawInit.h
/opt/X11//include/X11/Xaw3d
/opt/X11//include/X11/Xaw3d/Xaw3dP.h
/opt/X11//include/X11/Xaw3d/XawImP.h
/opt/X11//include/X11/Xaw3d/XawInit.h
/opt/X11//lib/libXaw.6.dylib
/opt/X11//lib/libXaw.7.dylib
/opt/X11//lib/libXaw.8.dylib
/opt/X11//lib/libXaw.dylib
/opt/X11//lib/libXaw3d.8.dylib
/opt/X11//lib/libXaw3d.dylib
/opt/X11//lib/libXaw6.6.dylib
/opt/X11//lib/libXaw6.dylib
/opt/X11//lib/libXaw7.7.dylib
/opt/X11//lib/libXaw7.dylib
/opt/X11//lib/libXaw8.8.dylib
/opt/X11//lib/libXaw8.dylib
/opt/X11//share/doc/libXaw3d
/opt/X11//share/man/man3/Xaw.3
Thanks for any suggestions!
-steve
I could reproduce this. This reflects an inconsistency in ngspice's configure that was not accommodated by the Homebrew formula. ngspice needs --without-x in configure to stop trying to link to X even though it needs --with-x to actually build X support.
This will be fixed once this pull request is accepted.
Homebrew welcomes these kinds of issues at the Github issue tracker; maintainers don't come around here much. Following the troubleshooting advice that brew recommends ("READ THIS: https://github.com/Homebrew/homebrew/wiki/troubleshooting") will make diagnosing problems easier in any venue. :)

Any ZMQ bindings for Erlang on Windows?

Is it possible to use Erlang with ZMQ on Windows? I have tried to use erlzmq2, but rebar fails to compile it with cryptic linker errors. Of course i can invest some time and investigate makefiles, but maybe other way exists?
Update
Whose who are interested in compilation errors can download latest erlang for windows and try to build erlzmq2 (Visual Studio 2012 compiler, msys sh and make). Error looks like:
cl : Command line error D8021 : invalid numeric argument '/Wl,-DLL,-IMPLIB:.libs
\zmq.dll.lib'
Makefile:541: recipe for target 'libzmq.la' failed
make[3]: *** [libzmq.la] Error 2
Please note that other erlang libs are compiling with this setup without any problems.
Your problem lies in compiling ZeroMQ for Windows. You haven't actually gotten to any Erlang yet. Here are some of the clues that tell you this:
Makefile:541: recipe for target 'libzmq.la' failed
This line says there's a problem on line 541 of the Makefile. But in erlzmq2, you can see that neither the main Makefile nor the c_src Makefile (which is what would build libzmq.la) has anything close to that many lines.
make3: * [libzmq.la] Error 2
The [3] means that you're 3 invocations deep into Make. Specifically, you started at the top-level Makefile, which called Rebar, which ran make -C c_src, which downloads ZeroMQ version 3.2.2 and tries to do a ./configure && make
To fix this Unix-style, go into the deps directory of erlzmq2 and figure out how to correctly compile ZeroMQ. Hopefully, you will just need to pass some arguments to configure. Then you can edit c_src/Makefile and set ZMQ_FLAGS to whatever you had to do for configure, clean, and make.
To fix it more Windows-style, follow the Windows build instructions for ZeroMQ. Put the compiled libzmq under deps and just edit the c_src Makefile to a no-op.
Finally, if you don't actually need to run this code on Windows, but are just using Windows as your development environment, I think you'll have the easiest time by running the build inside a Linux VM (not a hard thing at all with tools like Vagrant). Sorry, but Unix is the real system for this stuff; Windows support is an afterthought.

Resources