Compiling Octave 4.2.1 in linux, can't link to PCRE library with GCC 4.9.3 - gcc

When running the configure script for Octave, I do:
./configure CFLAGS="-I/customlibs/pcre/gnu/8.40/include -L/customlibs/pcre/gnu/8.40/lib/" LD_LIBRARY_PATH="/customlibs/pcre/gnu/8.40/lib"
I have also tried:
./configure CFLAGS="-I/customlibs/pcre/gnu/8.40/include" LDFLAGS="-L/customlibs/pcre/gnu/8.40/lib/" LD_LIBRARY_PATH="/customlibs/pcre/gnu/8.40/lib"
Both of these produce the same failure:
checking pcre.h usability... yes
checking pcre.h presence... no
configure: WARNING: pcre.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: pcre.h: proceeding with the compiler's result
checking for pcre.h... yes
checking pcre/pcre.h usability... no
checking pcre/pcre.h presence... no
checking for pcre/pcre.h... no
checking whether pcre.h defines the macros we need... no
configure: error: to build Octave, you must have the PCRE library and header files installed
I'm lost as to how it can find pcre.h but fails to do anything else with it. Am I doing something wrong on my configure line or is pcre broken? If it's my configure line, how do I link against pcre correctly?
For reference, here's the pcre path:
ls /customlibs/pcre/gnu/8.40/
bin
include
lib
share

I was struggling with that for a while as well, but the solution was actually very simple. just use CPPFLAGS rather than CFLAGS for include files:
./configure CPPFLAGS="-I/customlibs/pcre/gnu/8.40/include" LDFLAGS="-L/customlibs/pcre/gnu/8.40/lib/"
There's also no need for LD_LIBRARY_PATH upon configuring.

Related

Osslsigncode can't locate openssl on Windows

I'm trying to install osslsigncode on a Windows 10 machine. I've installed OpenSSL, and when I run OpenSSL from MinGW I get
OpenSSL>
And I can run genrsa, etc.
But when I run ./configure for osslsigncode, I get this error:
checking sys/mman.h usability... no
checking sys/mman.h presence... no
checking for sys/mman.h... no
checking windows.h usability... yes
checking windows.h presence... yes
checking for windows.h... yes
checking for dlopen in -ldl... no
checking termios.h usability... no
checking termios.h presence... no
checking for termios.h... no
checking for getpass... no
checking for GSF... no
checking for OPENSSL... no
checking for OPENSSL... no
checking for RSA_verify in -lcrypto... no
configure: error: OpenSSL 0.9.8 or later is required. http://www.openssl.org/
If I check for the version of OpenSSL,
OpenSSL> version
OpenSSL 1.0.0 29 Mar 2010
Any ideas why?
Check if you have set the global systemvariable OPENSSL.
This variable is requested in the file configure.ac and there in the two blocks named PKG_CHECK_MODULES are still more requirements that are checked during the configure-process.
You can set the variable OPENSSL statically, or for installation you do it like this:
SET OPENSSL=/PATH/TO/OPENSSL/
./configure
make
make install
/PATH/TO/OPENSSL/ has to be replaced by the right existing path.
I don't know if a path for OPENSSL is enough or if you have to assign the path to a binary / extecutable file, you've to try it if you never get a better hint.

How can I install System.Console.Readline for Haskell GHCi on Windows?

I am trying to run a haskell file from command prompt. I get the following error :
Failed to load interface for `System.Console.Readline'
Perhaps you meant System.Console.Haskeline (from haskeline-0.7.2.3)
Locations searched:
System\Console\Readline.hs
System\Console\Readline.lhs
System\Console\Readline.hsig
System\Console\Readline.lhsig
I thought readline came as part of cabal when you installed the full version of haskell? (which I have done) Does anyone have any idea how I can fix this?
EDIT: I tried >cabal update, followed by >cabal install readline, and I now get this:
Resolving dependencies...
Configuring readline-1.0.3.0...
Failed to install readline-1.0.3.0
Build log ( C:\Users\Dan\AppData\Roaming\cabal\logs\readline-1.0.3.0.log ):
Configuring readline-1.0.3.0...
bash.exe: warning: could not find /tmp, please create!
checking for gcc... C:\PROGRA~1\HASKEL~1\802E01~1.1\mingw\bin\gcc.exe
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether C:\PROGRA~1\HASKEL~1\802E01~1.1\mingw\bin\gcc.exe accepts -g... yes
checking for C:\PROGRA~1\HASKEL~1\802E01~1.1\mingw\bin\gcc.exe option to accept ISO C89... none needed
checking for GNUreadline.framework... checking for readline... no
checking for tputs in -lncurses... no
checking for tputs in -ltermcap... no
checking for tputs in -lcurses... no
checking for rl_readline_version... no
configure: error: readline not found, so this package cannot be built
See `config.log' for more details.
cabal: Leaving directory 'C:\Users\Dan\AppData\Local\Temp\cabal-tmp-884\readline-1.0.3.0'
cabal: Error: some packages failed to install:
readline-1.0.3.0 failed during the configure step. The exception was:
ExitFailure 1

Compiling PHP + Libpuzzle to Windows

I got the libpuzzle source here: http://www.pureftpd.org/project/libpuzzle/download.
I read I need MinGW to compile any C programs on windows, so I got that alot with C, C++ and mins options. Using mins I was followed: http://wiki.openttd.org/Compiling_on_MinGW
I downloaded the .tar.gz and unpacked it, executed the ./configure command and got:
libgd2 development files are not found
Makes sense given in the readme:
In order to load images, the library relies on the GD2 library.
You need to install gdlib2 and its development headers before compiling
libpuzzle.
The GD2 library is available as a pre-built package for most operating systems.
Debian and Ubuntu users should install the "libgd2-dev" or the "libgd2-xpm-dev"
package.
Gentoo users should install "media-libs/gd".
OpenBSD, NetBSD and DragonflyBSD users should install the "gd" package.
MacPorts users should install the "gd2" package.
X11 support is not required for the Puzzle library.
Once GD2 has been installed, configure the Puzzle library as usual:
My problem at this time is finding a libgd2-dev or like file to compile. I found this: http://mldonkey.sourceforge.net/Windows and downloaded http://www.boutell.com/gd/http/gd-2.0.33.tar.gz and it installed fine. Running gdlib-config outputs typical man. However, libpuzzle still says I need the "libgd2 development files", so I assume the gd I downloaded was "libgd" but just "gd" or the file I had didn't have development files. Where can I found what I need?
Here is mingw output:
Brian#2500K ~/libpuzzle-0.11
$ gdlib-config
Print information on GD library's version, configuration, and use.
Usage: gdlib-config [options]
Options:
--libdir # directory where GD library is installed
--includedir # directory where GD library headers are installed
--version # complete GD library version string
--majorversion # GD library major version number
--minorversion # GD library minor version number
--revision # GD library revision version number
--ldflags # options required for linking against GD library
--libs # libs required for linking against GD library
--cflags # options required for compiling GD library apps
--includes # same as --cflags
--features # lists optional features compiled into gd, separated
# by spaces. Currently (as of 2.0.26) the optional
# features are GD_PNG, GD_JPEG, GD_XPM, and
# GD_FREETYPE. When these features are reported by
# --features, it is safe to include calls to the
# related functions in your code.
--all # print a summary of all GD library configure options
Brian#2500K ~/libpuzzle-0.11
$ gdlib-config --includedir
/usr/local/include
Brian#2500K ~/libpuzzle-0.11
$ ./configure
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking whether ln -s works... no, using cp -p
checking whether make sets $(MAKE)... (cached) yes
checking for gdlib-config... /usr/local/bin/gdlib-config
checking for gdImageCreateFromGd2 in -lgd... no
configure: error: libgd2 development files not found
Edit: Started a bounty. I am looking for either compile the libpuzzle for me so it works on WAMP (skipping the complicated middle stuff). Or help on getting each requirement needed so that I can compile it. My end goal is having libpuzzle run on wamp
Edit 2: Just an update, it seems libgd2 has problems with mingw. Even if I was to get libgd2 to finally work then I still need phpize for mingw as well, which also doesn't work for mingw. It seems it's not possible to use libpuzzle for windows
It sounds like the program is just not finding the headers for libgd. If you look at that tarbar, it's a source tarball that includes the headers. When you compiled and installed it, it installed the library and the headers somewhere. You need to figure out where.
Run ./configure --help
There should be an option like --with-gd=, that option lets you tell it the path where libgd is installed. Specify the path where it is installed, and it should work.
Encountered the same error when compiled GD2 myself.
Using old precompiled version from GnuWin32 solved the problem:
http://sourceforge.net/projects/gnuwin32/files/gd/2.0.33-1/

rj package compilation failure

Thanks a lot for taking a look. There's a previous post on here with the same error message "cannot compile a simple JNI program" and the solution was to update to R 1.15. But I've already had everything in the newest version. Although it says "see config.log for details", it doesn't give a location, and "find / -name config.log" at the terminal returns nothing.
It's be an exhausting and frustrating process trying to get this to work. Any help will be much appreciated.
R version 2.15.1, 64-bit (I used Homebrew install, but it shouldn't be the problem)
Eclipse 4.2 Cocoa, 64-bit (tried 3.7 as well, didn't work either)
OSX 10.7.5
Here's the error message:
install.packages(c("rj"), repos="http://download.walware.de/rj-1.1")
Installing package(s) into '/Library/Frameworks/R.framework/Versions/2.15/Resources/library'
(as 'lib' is unspecified)
trying URL 'http://download.walware.de/rj-1.1/src/contrib/rj_1.1.0-4.tar.gz'
Content type 'application/x-tar' length 314501 bytes (307 Kb)
opened URL
==================================================
downloaded 307 Kb
* installing *source* package 'rj' ...
checking R config... found
R_HOME : /usr/local/Cellar/r/2.15.1/R.framework/Resources
checking for gcc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking Java support in R... ok
JAVA_HOME: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
JAVA : /usr/bin/java
JAVAC : /usr/bin/javac
JAVAH : /usr/bin/javah
JAVA_CPPFLAGS: -I/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/include
JAVA_LIBS: -framework JavaVM
JAR : /usr/bin/jar
configure: creating ./config.status
config.status: creating src/Makevars
=== configuring in jri (/private/var/folders/7p/q7qb1n2d277c9tqt65s5wy_c0000gn/T/RtmpVlP2YK/R.INSTALL2c9175fac4e/rj/jri)
configure: running /bin/sh ./configure --disable-option-checking '--prefix=/usr/local' --cache-file=/dev/null --srcdir=.
checking build system type... i386-apple-darwin11.4.2
checking host system type... i386-apple-darwin11.4.2
checking for gcc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... rm: conftest.dSYM: is a directory
rm: conftest.dSYM: is a directory
yes
checking whether Java interpreter works... checking whether JNI programs can be compiled... configure: error: Cannot compile a simple JNI program. See config.log for details.
configure: error: ./configure failed for jri
ERROR: configuration failed for package 'rj'
* removing '/Library/Frameworks/R.framework/Versions/2.15/Resources/library/rj'
* restoring previous '/Library/Frameworks/R.framework/Versions/2.15/Resources/library/rj'
The downloaded source packages are in
'/private/var/folders/7p/q7qb1n2d277c9tqt65s5wy_c0000gn/T/RtmpNM4Pyx/downloaded_packages'
Warning message:
In install.packages(c("rj"), repos = "http://download.walware.de/rj-1.1") :
installation of package 'rj' had non-zero exit status
Here is the session info.
sessionInfo()
R version 2.15.1 (2012-06-22)
Platform: x86_64-apple-darwin11.4.0 (64-bit)
locale:
[1] C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] tcltk_2.15.1 tools_2.15.1
I faced the same issue and below Solution worked for me. Please follow the steps
1.) You need to run this command on the terminal - R CMD javareconf
2.) After that check the compatibility of StatET with rJ package which is in below order.
For RJ 2.0 (StatET 3.4 - 3.5):
install.packages(c("rj", "rj.gd"), repos="http://download.walware.de/rj-2.0")
For RJ 1.1 (StatET 3.0 - 3.3):
install.packages(c("rj", "rj.gd"), repos="http://download.walware.de/rj-1.1")
For RJ 1.0 (StatET 2.0):
install.packages(c("rj", "rj.gd"), repos="http://download.walware.de/rj-1.0")
For RJ 0.5 (StatET 0.10):
install.packages("rj", repos="http://download.walware.de/rj-0.5")
3.) Once you know your compatible version in accordance with StatET then run the package installation command.
for example. I am using a StatET 3.5 thus for me RJ 2.0 will work and not others .
So command would be
{install.packages(c("rj", "rj.gd"), repos="http://download.walware.de/rj-2.0")}
4.) Once your installation is done then do check the environmental variable are set correctly in case you are using any IDE ( Like Eclipse ). Library paths should be set in Eclipse or any other IDE.
Follow this link in case of any issues - http://www.walware.de/?page=/it/statet/installation.html

./configure not seeing/finding boost header files

Trying to build gearman from the gearmand-0.33.tar.gz from Launchpad using bzr, on a Fedora 64 system.
doing the ./configure by tiself, as well as using the "-with-boost=/usr/include" param generates warnings an errors as the configure process can't seem to find/locate the boost header files.
we've removed/reinstalled the boost header files via "yum install boost*" as well
Any pointers will be tried!
Thanks
./configure
.
.
.
checking if more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... yes
checking for Boost headers version >= 1.39.0... yes
checking for Boost's header version... 1_41
checking for the toolset name used by Boost for g++... gcc44 -gcc
checking boost/program_options.hpp usability... no
checking boost/program_options.hpp presence... yes
configure: WARNING: boost/program_options.hpp: present but cannot be compiled
configure: WARNING: boost/program_options.hpp: check for missing prerequisite headers?
configure: WARNING: boost/program_options.hpp: see the Autoconf documentation
configure: WARNING: boost/program_options.hpp: section "Present But Cannot Be Compiled"
configure: WARNING: boost/program_options.hpp: proceeding with the compiler's result
configure: WARNING: ## -------------------------------------------------- ##
configure: WARNING: ## Report this to https://bugs.launchpad.net/gearmand ##
configure: WARNING: ## -------------------------------------------------- ##
checking for boost/program_options.hpp... no
configure: error: cannot find boost/program_options.hpp
Just have dealt with this problem, installed gcc-c++ and that has resolved it
The correct option is probably --with-boost, you should check that with ./configure -h.
Also, check whether the directory /usr/include/boost exists, because that seems to be what it's looking for.
Furthermore, make sure you shouldn't be using --with-boost-include=/usr/include (and maybe also --with-boost-libs (or -lib)).
In my case, using --with-boost=/path/to/root worked, where /path/to/root contains include/boost.
In other words, --with-boost=/path/to/root/include or --with-boost=/path/to/root/include/boost are both wrong.
I also set --with-boost-libdir=/path/to/root/lib64

Resources