cygwin install FGSL? - cygwin

I use gfortran on cygwin and want to install the FGSL package, then I try
xxx#xxx-PC ~
$wget http://www.lrz.de/services/software/mathematik/gsl/fortran/download/fgsl-1.0.0.tar.gz
$tar zxvf fgsl-1.0.0.tar.gz
$cd fgsl-1.0.0
$./configure
so far so good, then what next should I do?
https://de.wikibooks.org/wiki/Fortran:_FGSL
My apologies. Under Vladimir's guidance, I try
xxx#xxx-PC ~/fgsl-1.0.0
$ make
make all-recursive
make[1]: Entering directory '/cygdrive/d/CygwinWorkshop/fgsl-1.0.0'
Making all in .
make[2]: Entering directory '/cygdrive/d/CygwinWorkshop/fgsl-1.0.0'
/bin/sh ./libtool --tag=FC --mode=link gfortran -g -O2 -version-info 0:0:0 -o libfgsl.la -rpath /usr/local/lib fgsl.lo libfgsl_la-fgsl_utils.lo -lgsl -lgslcblas -lblas
/usr/bin/grep: /usr/lib/libblas.la: No such file or directory
/usr/bin/sed: can't read /usr/lib/libblas.la: No such file or directory
libtool: link: `/usr/lib/libblas.la' is not a valid libtool archive
Makefile:531: recipe for target 'libfgsl.la' failed
make[2]: *** [libfgsl.la] Error 1
make[2]: Leaving directory '/cygdrive/d/CygwinWorkshop/fgsl-1.0.0'
Makefile:636: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/cygdrive/d/CygwinWorkshop/fgsl-1.0.0'
Makefile:437: recipe for target 'all' failed
make: *** [all] Error 2
and
xxx#xxx-PC ~/fgsl-1.0.0
$ make install
Making install in .
make[1]: Entering directory '/cygdrive/d/CygwinWorkshop/fgsl-1.0.0'
/bin/sh ./libtool --tag=FC --mode=link gfortran -g -O2 -version-info 0:0:0 -o libfgsl.la -rpath /usr/local/lib fgsl.lo libfgsl_la-fgsl_utils.lo -lgsl -lgslcblas -lblas
/usr/bin/grep: /usr/lib/libblas.la: No such file or directory
/usr/bin/sed: can't read /usr/lib/libblas.la: No such file or directory
libtool: link: `/usr/lib/libblas.la' is not a valid libtool archive
Makefile:531: recipe for target 'libfgsl.la' failed
make[1]: *** [libfgsl.la] Error 1
make[1]: Leaving directory '/cygdrive/d/CygwinWorkshop/fgsl-1.0.0'
Makefile:636: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1
Some errors that I don't know how to handle occur.
According to the hints by screen, I next check
$ apt-cyg install lapack
Package lapack is already installed, skipping
$ apt-cyg install liblapack-devel
Package liblapack-devel is already installed, skipping
A fortran code named bsp.f03 given by https://de.wikibooks.org/wiki/Fortran:_FGSL
is used for testing purpose
program bsp
use fgsl
implicit none
real( kind = fgsl_double ) :: a
real( kind = fgsl_double ) :: d = 5.0_fgsl_double
a = d ** 2 * m_pi_4
write( *, * ) "Kreisflaeche = ", a
end program bsp
then I compile and link
$g95 bsp.f03 -I/usr/local/include/g95 -L/usr/local/lib -lgsl -lfgsl_g95 -lgslcblas
-bash: g95: command not found
I use R for statistical
computing on windows a lot and I'm a total newcomer to fortran and cygwin, so please forgive my very basic and naive questions about the above.

You are missing the configure step.The source package was configured for a different system.
In general, for any build, you should run
autoreconf -ivf
./configure
make
In addition before these steps, replace in Makefile.am
libfgsl_la_LDFLAGS = -version-info #LIB_CURRENT#:#LIB_REVISION#:#LIB_AGE# #FGSL_LDFLAGS#
with
libfgsl_la_LDFLAGS = -version-info #LIB_CURRENT#:#LIB_REVISION#:#LIB_AGE# #FGSL_LDFLAGS# -no-undefined
to build the shared library.

Related

undefined reference to `crypt' : apache2 manually install error on imx8mqevk

I am using an iMX8MQ EVK board with Linux. I want to install the apache2 server and MySQL database from the source. Started installing apache2 using this
Here is the Linux version:
root#imx8mqevk:~# cat /etc/os-release
ID=fsl-imx-wayland
NAME="NXP i.MX Release Distro"
VERSION="5.10-hardknott (hardknott)"
VERSION_ID=5.10-hardknott
PRETTY_NAME="NXP i.MX Release Distro 5.10-hardknott (hardknott)"
Here is the output of configure
Facing issue with make as crypto is not found. I am not able to resolve the issue.
I have tried installing glibc but the issue is not resolved.
make error
Making all in support
make[1]: Entering directory '/home/root/httpd-2.4.53/support'
make[2]: Entering directory '/home/root/httpd-2.4.53/support'
/usr/local/apr/build-1/libtool --silent --mode=link gcc -g -O2 -pthread -o htpasswd htpasswd.lo passwd_common.lo /usr/local/apr/lib/libaprutil-1.la -lexpat /usr/local/apr/lib/libapr-1.la -lrt -lpthread -ldl
/usr/lib/gcc/aarch64-poky-linux/10.2.0/../../../../aarch64-poky-linux/bin/ld: passwd_common.o: in function `mkhash':
/home/root/httpd-2.4.53/support/passwd_common.c:228: undefined reference to `crypt'
/usr/lib/gcc/aarch64-poky-linux/10.2.0/../../../../aarch64-poky-linux/bin/ld: /home/root/httpd-2.4.53/support/passwd_common.c:240: undefined reference to `crypt'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:48: htpasswd] Error 1
make[2]: Leaving directory '/home/root/httpd-2.4.53/support'
make[1]: *** [/home/root/httpd-2.4.53/build/rules.mk:75: all-recursive] Error 1
make[1]: Leaving directory '/home/root/httpd-2.4.53/support'
make: *** [/home/root/httpd-2.4.53/build/rules.mk:75: all-recursive] Error 1

Building Debian with Buildroot: libDeviceIo.so: file format not recognized

Im trying to compile for a project debian for this device: https://www.engicam.com/vis-prod/PX30-Core/PX30-Core-EDIMM-SOM-based-on-RockChip--PX30 which has an aarch64 architecture. I'm using a VM provided by them which should already have all the tools and configurations ready, but I'm running into some issues. If I've understood correctly I have to build buildroot to build Debian, after adding a couple packages with make menuconfig and running make I get this error:
PATH="/home/user/px30/buildroot/output/host/bin:/home/user/px30/buildroot/output/host/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" /usr/bin/make -j9 CXXFLAGS+="-DRKDEVICEIO -I/home/user/px30/buildroot/../external/deviceio_release/DeviceIO/include" LFLAGS+=" -lDeviceIo -lasound" -C /home/user/px30/buildroot/output/build/qsetting-1.0
make[1]: Entering directory '/home/user/px30/buildroot/output/build/qsetting-1.0'
/home/user/px30/buildroot/output/host/bin/aarch64-buildroot-linux-gnu-g++ -lDeviceIo -lasound -o qsetting main.o mainwindow.o qtaudio.o qtbt.o qtfactory.o qtinputdialog.o qtkeyboard.o qtupdate.o qtwifi.o qrc_res.o moc_mainwindow.o moc_qtaudio.o moc_qtbt.o moc_qtfactory.o moc_qtinputdialog.o moc_qtkeyboard.o moc_qtupdate.o moc_qtwifi.o -lQt5Widgets -lQt5Multimedia -lQt5Gui -lQt5Network -lQt5Core -latomic -lrt -ldl /home/user/px30/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/libGLESv2.so -lpthread -lrt -lpthread -ldl
/home/user/px30/buildroot/output/host/lib/gcc/aarch64-buildroot-linux-gnu/6.5.0/../../../../aarch64-buildroot-linux-gnu/bin/ld:/home/user/px30/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/../lib64/libDeviceIo.so: file format not recognized; treating as linker script
/home/user/px30/buildroot/output/host/lib/gcc/aarch64-buildroot-linux-gnu/6.5.0/../../../../aarch64-buildroot-linux-gnu/bin/ld:/home/user/px30/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/../lib64/libDeviceIo.so:0: syntax error
collect2: error: ld returned 1 exit status
Makefile:214: recipe for target 'qsetting' failed
make[1]: *** [qsetting] Error 1
make[1]: Leaving directory '/home/user/px30/buildroot/output/build/qsetting-1.0'
package/pkg-generic.mk:254: recipe for target '/home/user/px30/buildroot/output/build/qsetting-1.0/.stamp_built' failed
make: *** [/home/user/px30/buildroot/output/build/qsetting-1.0/.stamp_built] Error 2
I tried to open /px30/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/libDeviceIo.so and it's an ASCII file
user#ubuntu:~/px30/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib$ cat libDeviceIo.so
fake
user#ubuntu:~/px30/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib$ file libDeviceIo.so
libDeviceIo.so: ASCII text
EDIT: I did not find a solution, I solved it by removing the package qsetting from the target packages

Tag command not found when running make on crosstool-ng

For some reason on my ubuntu system, running make on crosstool-ng throws this error. I tried seeing if I could find a package that has the tag command but I dont think that this exists.
/usr/bin/make all-recursive
make[1]: Entering directory '/home/rahul/crosstool-ng'
Making all in kconfig
make[2]: Entering directory '/home/rahul/crosstool-ng/kconfig'
/usr/bin/make all-am
make[3]: Entering directory '/home/rahul/crosstool-ng/kconfig'
tag CC --mode=link gcc -g -O2 -o conf conf.o zconf.o
/bin/bash: tag: command not found
Makefile:497: recipe for target 'conf' failed
make[3]: [conf] Error 127 (ignored)
tag CC --mode=link gcc -D_GNU_SOURCE -I/usr/include/ncursesw -g -O2 -o nconf nconf-nconf.o nconf-nconf.gui.o nconf-zconf.o -lmenuw -lpanelw -lncursesw -ltinfo
/bin/bash: tag: command not found
Makefile:523: recipe for target 'nconf' failed
make[3]: [nconf] Error 127 (ignored)
tag CC --mode=link gcc -g -O2 -o mconf mconf.o zconf.o lxdialog/checklist.o lxdialog/inputbox.o lxdialog/menubox.o lxdialog/textbox.o lxdialog/util.o lxdialog/yesno.o -lncursesw -ltinfo
/bin/bash: tag: command not found
Makefile:519: recipe for target 'mconf' failed
make[3]: [mconf] Error 127 (ignored)
make[3]: Leaving directory '/home/rahul/crosstool-ng/kconfig'
make[2]: Leaving directory '/home/rahul/crosstool-ng/kconfig'
make[2]: Entering directory '/home/rahul/crosstool-ng'
make[2]: Leaving directory '/home/rahul/crosstool-ng'
make[1]: Leaving directory '/home/rahul/crosstool-ng'
If you are still looking for the answer you can find it here: https://github.com/crosstool-ng/crosstool-ng/issues/944#issuecomment-381447332
You just need to run apt install libtool-bin.

How to enable apache-http/2 in centos 7?

I have followed the below link for enabling http/2 in centos-7 apache.
https://www.tunetheweb.com/performance/http2/
My openssl version :
# openssl version
OpenSSL 1.1.0f 25 May 2017
While installing latest apr-util and apache(httpd-2.4.27)
below errors occurred on make command
Inside the apr-util folder :
# make
make[1]: Entering directory `/usr/local/src/apr-util-1.6.0'
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.0/incl
ude -I/usr/local/src/apr-util-1.6.0/include/private -I/usr/local/apr/include/apr-1 -o xml/apr_xml.lo -c xml/apr_xml.c && touch xml/apr_xml.lo
xml/apr_xml.c:35:19: fatal error: expat.h: No such file or directory
#include <expat.h>
^
compilation terminated.
make[1]: *** [xml/apr_xml.lo] Error 1
make[1]: Leaving directory `/usr/local/src/apr-util-1.6.0'
make: *** [all-recursive] Error 1
Inside the httpd folder :
#make
Making all in srclib
make[1]: Entering directory `/usr/local/src/httpd-2.4.27/srclib'
Making all in apr
make[2]: Entering directory `/usr/local/src/httpd-2.4.27/srclib/apr'
make[3]: Entering directory `/usr/local/src/httpd-2.4.27/srclib/apr'
make[3]: Nothing to be done for `local-all'.
make[3]: Leaving directory `/usr/local/src/httpd-2.4.27/srclib/apr'
make[2]: Leaving directory `/usr/local/src/httpd-2.4.27/srclib/apr'
Making all in apr-util
make[2]: Entering directory `/usr/local/src/httpd-2.4.27/srclib/apr-util'
make[3]: Entering directory `/usr/local/src/httpd-2.4.27/srclib/apr-util'
/bin/sh /usr/local/src/httpd-2.4.27/srclib/apr/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/htt
pd-2.4.27/srclib/apr-util/include -I/usr/local/src/httpd-2.4.27/srclib/apr-util/include/private -I/usr/local/src/httpd-2.4.27/srclib/apr/include -o xml/apr_xml.lo -c xml/a
pr_xml.c && touch xml/apr_xml.lo
xml/apr_xml.c:35:19: fatal error: expat.h: No such file or directory
#include <expat.h>
^
compilation terminated.
make[3]: *** [xml/apr_xml.lo] Error 1
make[3]: Leaving directory `/usr/local/src/httpd-2.4.27/srclib/apr-util'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/src/httpd-2.4.27/srclib/apr-util'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/httpd-2.4.27/srclib'
make: *** [all-recursive] Error 1
I would suggest to install ready to use package from https://codeit.guru/en_US/2017/10/apache-httpd-2-4-28-built-against-openssl-1-0-2l-with-http2-for-red-hat-enterprise-linux-and-centos/
Alternatively, you can recompile it from SRPM provided by Fedora or CodeIT (the same one with changed defaults and openssl paths):
rpmbuild -ba ~/rpmbuild/SPECS/httpd.spec
#nos was correct and this needed yum install expat-devel and a few other dependencies I already had installed.
I've updated the blog post now to reflect this. Feel free to reach out to me if you've any other issues on this.
Now is available repo from codeit.guru for CentOS 7, it can be enabled:
cd /etc/yum.repos.d && wget https://repo.codeit.guru/codeit.el`rpm -q --qf "%{VERSION}" $(rpm -q --whatprovides redhat-release)`.repo
If apache is already installed, yum update will update apache, it even enables mod_http2.
Otherwise, fresh installation of apache can be done.
Put Protocols h2 http/1.1 within ssl.conf as Mozilla suggests
Restart apache, http/2 is ready.

Installing OSVR on Linux - Setting binary directory

I am currently trying to install OSVR-Core on my Debian 9.1 system. I installed all the prerequisites and followed this tutorial. Now I am stuck at making the project. I created a build-directory and tried running
cmake -DCMAKE_PREFIX_PATH="/usr/local/stow/libfunctionality" ~/src/OSVR-Core
but I get the error, that my binary directory should be different from my source directory. My source directory (with the make-files) should be ~/src/OSVR-Core and since I am in ~/src/OSVR-Core/build, I thought this was enough.
How (and where) do I change the location of the binary directory? I tried the command line option -D CMAKE_BINARY_DIR= "path/to/OSVR-Core/build but that did not work. I read online, that you should not set the Binary directory manually, but that it is created/calculated.
This is the CMakeError.log file:
Determining if the pthread_create exist failed with the following output:
Change Dir: /home/lenala/src/OSVR-Core/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_42e59/fast"
/usr/bin/make -f CMakeFiles/cmTC_42e59.dir/build.make CMakeFiles/cmTC_42e59.dir/build
make[1]: Entering directory '/home/lenala/src/OSVR-Core/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_42e59.dir/CheckSymbolExists.c.o
/usr/bin/cc -o CMakeFiles/cmTC_42e59.dir/CheckSymbolExists.c.o -c /home/lenala/src/OSVR-Core/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTC_42e59
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_42e59.dir/link.txt --verbose=1
/usr/bin/cc CMakeFiles/cmTC_42e59.dir/CheckSymbolExists.c.o -o cmTC_42e59 -rdynamic
CMakeFiles/cmTC_42e59.dir/CheckSymbolExists.c.o: In function `main':
CheckSymbolExists.c:(.text+0x1b): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_42e59.dir/build.make:97: recipe for target 'cmTC_42e59' failed
make[1]: *** [cmTC_42e59] Error 1
make[1]: Leaving directory '/home/lenala/src/OSVR-Core/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_42e59/fast' failed
make: *** [cmTC_42e59/fast] Error 2
File /home/lenala/src/OSVR-Core/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>
int main(int argc, char** argv)
{
(void)argv;
#ifndef pthread_create
return ((int*)(&pthread_create))[argc];
#else
(void)argc;
return 0;
#endif
}
Determining if the function pthread_create exists in the pthreads failed with the following output: Change Dir: /home/lenala/src/OSVR-Core/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_f2984/fast"
/usr/bin/make -f CMakeFiles/cmTC_f2984.dir/build.make CMakeFiles/cmTC_f2984.dir/build
make[1]: Entering directory '/home/lenala/src/OSVR-Core/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_f2984.dir/CheckFunctionExists.c.o
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_f2984.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.7/Modules/CheckFunctionExists.c
Linking C executable cmTC_f2984
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_f2984.dir/link.txt --verbose=1
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_f2984.dir/CheckFunctionExists.c.o -o cmTC_f2984 -rdynamic -lpthreads
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_f2984.dir/build.make:97: recipe for target 'cmTC_f2984' failed
make[1]: *** [cmTC_f2984] Error 1
make[1]: Leaving directory '/home/lenala/src/OSVR-Core/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_f2984/fast' failed
make: *** [cmTC_f2984/fast] Error 2
Have you used the
cmake .. -DJSONCPP_WITH_CMAKE_PACKAGE=ON -DJSONCPP_LIB_BUILD_SHARED=OFF -DCMAKE_CXX_FLAGS=-fPIC
since that's what the tutorial says to use to build the project and that the CMakaList.txt will handle all the paths.
I managed to get it to work. I reinstalled libfunctionality in my ~/src directory. Then I removed the github repository of OSVR-core and cloned it again. After that it worked, using:
$ cmake .. -DJSONCPP_WITH_CMAKE_PACKAGE=ON -DJSONCPP_LIB_BUILD_SHARED=OFF -DCMAKE_CXX_FLAGS=-fPIC
$ make

Resources