How can I get cygwin to disable fortran? - cygwin

I'm trying to install the HDF4 library for GDAL using Cygwin, and the readme instructs me to configure the source code as such:
./configure <--disable-fortran>
--enable-hdf4-xdr
--with-zlib=/path_to_ZLIB_install_directory
--with-jpeg=/path_to_JPEG_install_directory
<--with-szlib=/path_to_SZIP_install_directory>
--prefix=/path_to_HDF4_install_directory
However, I can't seem to get the <--disable-fortran> part right. It returns an error when executed:
-bash: --disable-fortran: No such file or directory
What am I doing wrong? I'm a novice to programming.
Edit:
This is the link to the readme: https://support.hdfgroup.org/ftp/HDF/HDF_Current/src/unpacked/release_notes/INSTALL_CYGWIN.txt

as Dennis wrote, you are misunderstanding the meaning of <..> . In this context
they are optional not mandatory configuration
./configure <--disable-fortran>
--enable-hdf4-xdr
--with-zlib=/path_to_ZLIB_install_directory
--with-jpeg=/path_to_JPEG_install_directory
<--with-szlib=/path_to_SZIP_install_directory>
--prefix=/path_to_HDF4_install_directory
so one possible way is to include the first and not the second:
./configure --disable-fortran
--enable-hdf4-xdr
--with-zlib=/path_to_ZLIB_install_directory
--with-jpeg=/path_to_JPEG_install_directory
--prefix=/path_to_HDF4_install_directory

Related

How to set values in Makefile.poisx

I am trying to build nrfsdk for the nrf52840 armgcc, running make gives following error.
su#su-desktop:~/nRF/nRF5_SDK_17.1.0_ddde560/examples/peripheral/template_project/pca10056/blank/armgcc$ make
/home/su/gcc-arm-none-eabi/bin/arm-none-eabi-gcc: 1: cannot open ##P�#8: No such file
/home/su/gcc-arm-none-eabi/bin/arm-none-eabi-gcc: 1: Syntax error: Unterminated quoted string
Cannot find: '/home/su/gcc-arm-none-eabi/bin/arm-none-eabi-gcc'.
Please set values in: "/home/su/nRF/nRF5_SDK_17.1.0_ddde560/components/toolchain/gcc/Makefile.posix"
according to the actual configuration of your system.
../../../../../../components/toolchain/gcc/Makefile.common:129: *** Cannot continue. Stop.
su#su-desktop:~/nRF/nRF5_SDK_17.1.0_ddde560/examples/peripheral/template_project/pca10056/blank/armgcc$
make sure you actually have the arm-none-eabi-gcc toolchain installed.
arm-none-eabi-gcc --version
if you don't have it, you can find it here: https://developer.arm.com/downloads/-/gnu-rm
if you do have it installed but are not sure of where to find it, run this
$ whereis arm-none-eabi-gcc
arm-none-eabi-gcc /opt/arm-none-eabi-gcc/bin/arm-none-eabi-gcc <-- this line can be different for you
then you can edit the Makefile.posix file (ex by opening it in a text editor)
go to the directory of your nrfSDK install, then components>toolchain>gcc>Makefile.posix
and edit the GNU_INSTALL_ROOT field (for me that was /opt/arm-none-eabi-gcc/bin) and GNU_VERSION field to whatever toolchain version you installed (9.3.1 in my case)
Hope it helps :)

Run ./configure from bash script fails due "error: cannot compute suffix of object files"

I'm trying to automate some stage of compile/build on Linux RHEL7 host using a bash script, but when i try to use ./configure it fails due to :
configure:3793: error: in `/app/compiling/BUILD_AREA/TEST/SRC/zabbix-4.2.6':
configure:3795: error: cannot compute suffix of object files: cannot compile
using :
CC="gcc"
PATH="/app/app_lib/mysql/bin:/app/app_lib/bin:/app/app_lib/build-1:/app/app_lib:$PATH"
LD_LIBRARY_PATH="/app/app_lib:/app/app_lib/include:/app/app_lib/lib:/app/apache/modules:/app/app_lib/ssl:/app/app_lib/lib/iconv:/app/oracle/product/12.1.0/lib:/app/ap_lib/mysql/lib:$LD_LIBRARY_PATH"
export CC
export PATH
export LD_LIBRARY_PATH
ARG_ZABBIX="--prefix=/app/zabbix --datarootdir=/app/zabbix/share --docdir=/app/zabbix/share/doc/$PKGAPPDIR --enable-agent --enable-ipv6 --enable-java --enable-server --includedir=/app/zabbix/include --libdir=/app/zabbix/lib --mandir=/app/zabbix/share/man/$PKGAPPDIR --with-libcurl=/app/app_lib/bin/curl-config --with-libxml2=/app/app_lib/bin/xml2-config --with-mysql=/app/mysql/bin/mysql_config --with-net-snmp=/app/app_lib/bin/net-snmp-config --with-openipmi=/app/app_lib --with-ssh2=/app/app_lib"
CONFIGURE="configure"
cd /app/compiling/BUILD_AREA/TEST/SRC/zabbix-4.2.6
"./${CONFIGURE}" "${ARG_ZABBIX}" 2>&1
Any help would be really appreciated!
Any help would be really appreciated!
Find the respective config.log (like the one in $(builddir)/gcc) and have a look. Some configure tests might fail as configure is querying availability of host features; the relevant fail is usually recorded at the end of the relevant config.log.
A common cause for this error is that the target Binutils (as, the assembler) cannot be found as configure is trying to find out what suffix to use for object files. Or host as is used where actually the target as (as of --target=) should be used, and the host as throws a syntax error because it is fed with target assembly.
./configure
GCC does not support configuring in the source directory or any of its sub-folders:
"First, we highly recommend that GCC be built into a separate directory from the sources which does not reside within the source tree."

Error in attempting to create a new Stack project with GHCJS compiler

I am attempting to set up a new Stack project on NixOS with GHCJS as the compiler following the instructions at http://docs.haskellstack.org/en/stable/ghcjs.html
I have included in my stack.yaml file the following lines of code (all on one line because tab spaces seem to give issues):
# Compiler specifying the GHCJS compiler for this project (using improved base).
compiler: ghcjs-0.2.0.20151230.3_ghc-7.10.2
compiler-check: match-exact
setup-info:
ghcjs: source:
ghcjs-0.2.0.20151230.3_ghc7.10.2:
url: "https://github.com/nrolland/ghcjs/releases/download/v.0.2.0.20151230.3/ghcjs-0.2.0.20151230.3.tar.gz"
and I have retrieved the following error message when I ran stack setup
Could not parse '/home/lorkaan/pandocJS/stack.yaml':
InvalidYaml (Just (YamlParseException {yamlProblem = "mapping values are not allowed in this context", yamlContext = "", yamlProblemMark = YamlMark {yamlIndex = 487, yamlLine = 12, yamlColumn = 17}}))
See https://github.com/commercialhaskell/stack/blob/release/doc/yaml_configuration.md.
Additionally, I tried removing the setup-info field because Stack was complaining about it, leaving my stack.yaml file like:
# Compiler specifying the GHCJS compiler for this project (using improved base).
compiler: ghcjs-0.2.0.20151230.3_ghc-7.10.2
compiler-check: match-exact
which produces this output with the stack setup command:
Warning: /home/lorkaan/pandocJS/stack.yaml: Unrecognized field in ProjectAndConfigMonoid: compiler
Preparing to install GHC to an isolated location.
This will not interfere with any system-level installation.
Already downloaded.
The following executables are missing and must be installed: make
Does anybody have any idea why this would be happening?
the first error is because of a basic syntax error in your YAML configuration. The correct version would be:
setup-info:
ghcjs:
source:
ghcjs-0.2.0.20151230.3_ghc7.10.2:
url: "https://github.com/nrolland/ghcjs/releases/download/v.0.2.0.20151230.3/ghcjs-0.2.0.20151230.3.tar.gz"
The second error is because of exactly what it says: you are lacking the make utility. You need to use your Linux distribution's package management system to install make. Since I don't know which distribution you are on, I can only recommend simply executing the $ make command and seeing if the environment is smart enough to point out which package it can be found in. Ubuntu typically does that. Then it's only a matter of apt-get install-ing the package, or possibly yum install-ing on e.g. CentOS and Fedora, etc.
P.S. questions like yours normally get a downvote for not having shown sufficient effort in diagnosing the problem (or for putting 2 totally separate problems under a single question) but I'm giving you the benefit of the doubt and just hoping you'll be tidier next time.

Adding path and linking libraries

I am trying to complete the installation for some software. According to which I have to add path. I am not getting it how to do that. Please guide me how to do the following steps.
Add the path to Rpa/Tk headers:
-I/usr/include/rpatk
To link to the Rpa/Tk libraries on Linux add the following link options:
-lrpa -lrvm -lrex -lrlib -lm
RVM library uses some math functions from the system math library, that is why you must include '-lm' to include the math library to your project in addition to the Rpa/Tk built libraries:
librpa librex librvm librlib
http://www.rpasearch.com/rpatk/doc/doxygen/rpadoc/html/rpatk_build.html
this will be within your configure script -- you will need to hack this and add the paths to where gcc/cc gets called
give the link to the actual tar.gz
looking at the example code: http://www.rpasearch.com/rpatk/doc/doxygen/rpadoc/html/js-tokenizer_8c-example.html
gcc -I/usr/include/rpatk -o js-tokenizer js-tokenizer.c -lrex -lrlib
so in short :
export LD_LIBRARY_PATH=/usr/include/rpatk:/usr/local/lib:/lib:/usr/lib
then running the configure may fix the issue
where the bit in bold would the path to the includes for this project

How to properly create autoconf setup of netcdf 4.x?

I am not sure exactly what my question is as I get seriously turned around by autoconf/automake/libtoolize etc. Several of us are trying to autoconferize mbsystem. I've thrown a repo up of the work to date here:
https://bitbucket.org/schwehr/mbsystem
I'm trying to improve the netcdf setup to use nc-config, but am uncertain how to do this correctly. I am working on configure.in. It seems unable to find a header with AC_CHECK_HEADER("netcdfcpp.h") after INCLUDES="$INCLUDES ``$nc_config --cflags``" (pardon the incorrect back ticks) as taken from the gdl netcdf check. What is the correct way to update the path from nc-config --cflags?
http://gnudatalanguage.cvs.sourceforge.net/viewvc/gnudatalanguage/gdl/configure.in?revision=1.121
I then tried to use AX_PATH_GENERIC and get stuck on this error with m4_include([m4/ax_path_generic.m4])
Running autoconf ...
configure.in:29: error: possibly undefined macro: AC_SUBST
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure:12992: error: possibly undefined macro: AC_MSG_RESULT
Any help in getting better at creating a netcdf check that actually will work with funky non-standard install locations via nc-config and figuring out how to properly put a macro in the m4 directory would be a huge help.
A pointer to a package doing this really cleanly would be a super help. I've been looking at the netcdf, gdal, geos and gdl sources for examples. And things like the octopus netcdf check do not use nc-config... http://www.tddft.org/trac/octopus/browser/trunk/m4/netcdf.m4
The current setup with fink for netcdf 4.x:
nc-config --cflags --libs
-I/sw/opt/netcdf7/include -I/sw/include
-L/sw/opt/netcdf7/lib -lnetcdf
Thanks!
See Makefile.am: How to use curl-config and xml2-config in configure.ac? and substitute xml2/curl by netcdf.
Just use
PKG_CHECK_MODULES([libnetcdf], [netcdf])
in configure.ac, and then, in Makefile.am:
AM_CPPFLAGS = ${libnetcdf_CFLAGS}
bin_PROGRAMS = foo
foo_SOURCES = ...
foo_LDADD = ${libnetcdf_LIBS}
The "correct" way to use a third party m4 macro is to use aclocal (usually via automake) to generate aclocal.m4. If you are using automake, just add
ACLOCAL_AMFLAGS = -I m4
to Makefile.am and put
AC_CONFIG_MACRO_DIR([m4])
in configure.ac (after renaming configure.in).
If you are not using automake, add '-I m4' when you invoke aclocal. If you are not using aclocal, then you'll have to append the definition of the macro to the end of aclocal.m4 (and be careful to never run aclocal, as that will overwrite the file.)
There is no good example of a clean way to use conf scripts to do a build because using such scripts is an inherently flawed approach. A slightly cleaner approach is to stop using custom scripts and use pkg-config via PKG_CHECK_MODULES, but the cleanest way to do this is to educate your users. If the user wants to install the library in funky non-standard locations then they need to be educated enough to set LDFLAGS and CPPFLAGS appropriately.

Resources