perl5 macos Regexp::Grammars install dies on B::Hooks::Parser - macos

I am trying to install Damian Conway's cpan Regexp::Grammars on macos. I made sure to install Xcode (gcc, clang), first ran 'capn upgrade' on the macos perl (which is now 5.30.3), and then tried the naive 'install Regexp::Grammars'. Alas,
cpan[2]> install B::Hooks::Parser
Running install for module 'B::Hooks::Parser'
ETHER/B-Hooks-Parser-0.21.tar.gz
Has already been unwrapped into directory /Users/me/.cpan/build/B-Hooks-Parser-0.21-0
ETHER/B-Hooks-Parser-0.21.tar.gz
Has already been prepared
ETHER/B-Hooks-Parser-0.21.tar.gz
Could not make: Unknown error
which appeared after
...many more
cp lib/B/Hooks/Parser.pm blib/lib/B/Hooks/Parser.pm
cp hook_parser.h blib/arch/B/Hooks/Parser/Install/hook_parser.h
Running Mkbootstrap for Parser ()
chmod 644 "Parser.bs"
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Parser.bs blib/arch/auto/B/Hooks/Parser/Parser.bs 644
"/usr/bin/perl" "/System/Library/Perl/5.30/ExtUtils/xsubpp" -typemap '/System/Library/Perl/5.30/ExtUtils/typemap' Parser.xs > Parser.xsc
mv Parser.xsc Parser.c
cc -c -I/System/Library/Perl/Extras/5.30/darwin-thread-multi-2level/B/Hooks/OP/Check/Install -g -pipe -DPERL_USE_SAFE_PUTENV -Wno-error=implicit-function-declaration -Os -DVERSION=\"0.21\" -DXS_VERSION=\"0.21\" -iwithsysroot "/System/Library/Perl/5.30/darwin-thread-multi-2level/CORE" Parser.c
In file included from Parser.xs:16:
./hook_parser.h:5:10: fatal error: 'hook_op_check.h' file not found
#include "hook_op_check.h"
^~~~~~~~~~~~~~~~~
1 error generated.
make: *** [Parser.o] Error 1
ETHER/B-Hooks-Parser-0.21.tar.gz
/usr/bin/make -- NOT OK
... many more
and it failed to install Regexp::Grammars . Regexp::Grammars does seem to install on linux. easy or hard fix?

Related

gcc/gfortran 11 cannot find headers/libraries in default locations

After upgrading python 3.8.6 to 3.9.10 using homebrew, my Cython extensions no longer without explicitly adding /usr/local/include (for my Intel MacBook) or /opt/homebrew/include to the include_dirs of my extension.
My setup.py.in:
import os, sys
from numpy.distutils.core import setup, Extension
from Cython.Build import cythonize
link_arguments = []
extra_include_dirs = []
if (sys.platform == 'darwin'):
link_arguments.append("-Wl,-rpath")
link_arguments.append("-Wl,#loader_path/")
if os.path.exists('/opt/homebrew/'):
extra_include_dirs.append("/opt/homebrew/include/")
else:
extra_include_dirs.append("/usr/local/include/")
else:
link_arguments.append("-Wl,-rpath=${CMAKE_SOURCE_DIR}/lib/")
pynwp_extension = Extension(
name="pynwp",
sources=["${CMAKE_CURRENT_SOURCE_DIR}/lambert.f90", "${CMAKE_CURRENT_SOURCE_DIR}/pynwp.f90", "${CMAKE_CURRENT_SOURCE_DIR}/readAtmosphereGen.f90", "${CMAKE_CURRENT_SOURCE_DIR}/ptogrot.f", "${CMAKE_CURRENT_SOURCE_DIR}/bilin1.f", "${CMAKE_CURRENT_SOURCE_DIR}/fl2pres_f.f","${CMAKE_CURRENT_SOURCE_DIR}/message.c","${CMAKE_CURRENT_SOURCE_DIR}/gridWindDirCorrection.F"],
libraries=["HirlamUtils_fPIC", "eccodes_f90", "jasper"],
library_dirs=["${PROJECT_BINARY_DIR}", "${CMAKE_SOURCE_DIR}/build${CMAKE_BUILD_TYPE}/src/libHirlamUtils/", "/opt/homebrew/lib/"],
extra_link_args = link_arguments,
include_dirs=["${CMAKE_SOURCE_DIR}/include", "/usr/lib64/gfortran/modules/",
"${CMAKE_SOURCE_DIR}/build${CMAKE_BUILD_TYPE}"] + extra_include_dirs,
extra_f90_compile_args=["-DLINUX", "-DIS_LITTLE_ENDIAN", "-DUSEWALLTIME", "-DHAS_BLAS", "-DHAS_LAPACK", "-DGRIB32", "-DTIMING", "-DPREC32", "-fno-whole-file", "-g", "-fbounds-check"]
#compiler_directives={'language_level' : "3"}
)
setup(name="pynwp",
author="me",
author_email="me!me.com",
version="1.0.1",
description="Python wrapper for pynwp",
package_dir={"": "${CMAKE_CURRENT_SOURCE_DIR}"},
url="http://emaddc.eu",
license="MIT License",
ext_modules=[pynwp_extension]
)
In the file above, I have hardcoded the location (temporarily) of the homebrew library dir and added some functionality for the include dir based on /opt/homebrew being found. If I remove this from the file, compilation fails as eccodes.mod cannot be found, see the output when I run the command generate by python/CMake manually:
buildDebug git:(master) ✗ /opt/homebrew/bin/gfortran -Wall -g -fno-second-underscore -fPIC -O3 -funroll-loops -I<project_dir>//include -I/usr/lib64/gfortran/modules/ -I<project_dir>//buildDebug -Ibuild/src.macosx-12-arm64-3.9/build/src.macosx-12-arm64-3.9 -I/opt/homebrew/lib/python3.9/site-packages/numpy/core/include -Ibuild/src.macosx-12-arm64-3.9/numpy/distutils/include -I/opt/homebrew/opt/python#3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c -c <project_dir>//src/pynwp/readAtmosphereGen.f90 -o build/temp.macosx-12-arm64-3.9<project_dir>//src/pynwp/readAtmosphereGen.o -DLINUX -DIS_LITTLE_ENDIAN -DUSEWALLTIME -DHAS_BLAS -DHAS_LAPACK -DGRIB32 -DTIMING -DPREC32 -fno-whole-file -g -fbounds-check
f951: Warning: Nonexistent include directory '/usr/lib64/gfortran/modules/' [-Wmissing-include-dirs]
f951: Warning: Nonexistent include directory 'build/src.macosx-12-arm64-3.9/build/src.macosx-12-arm64-3.9' [-Wmissing-include-dirs]
f951: Warning: Nonexistent include directory 'build/src.macosx-12-arm64-3.9/numpy/distutils/include' [-Wmissing-include-dirs]
<project_dir>//src/pynwp/readAtmosphereGen.f90:3:7:
3 | use eccodes
| 1
Fatal Error: Cannot open module file 'eccodes.mod' for reading at (1): No such file or directory
compilation terminated.
This extension is part of a larger project that is build using CMake. When running the gfortran command manually, the same errors indicating that eccodes.mod cannot be found. The file is however located on a default location on the gfortran/gcc search path:
locate eccodes.mod
/opt/homebrew/Cellar/eccodes/2.24.2/include/eccodes.mod
/opt/homebrew/include/eccodes.mod
And the search path for gfortran:
gfortran -E -Wp,-v -
#include <...> search starts here:
/opt/homebrew/include
/opt/homebrew/Cellar/gcc/11.2.0_3/bin/../lib/gcc/11/gcc/aarch64-apple-darwin21/11/include
/opt/homebrew/Cellar/gcc/11.2.0_3/bin/../lib/gcc/11/gcc/aarch64-apple-darwin21/11/include-fixed
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/System/Library/Frameworks
End of search list.
Another project uses gcc/ld and has a similar problem. I need to explicitly add LINK_DIRECTORIES(/opt/homebrew/lib) to CMakeList.txt in order for gcc to find the eccodes library. Without that, I get:
gcc-11: warning: this compiler does not support X86 (arch flags ignored)
ld: library not found for -leccodes
collect2: error: ld returned 1 exit status
make[2]: *** [src/smoothModeS-v51/smoothModeS-v51.x] Error 1
make[1]: *** [src/smoothModeS-v51/CMakeFiles/smoothModeS-v51.x.dir/all] Error 2
make: *** [all] Error 2
Adding the paths to CPATH and LIBRARY_PATH had no effect.
This method works but seems hard to maintain. What am I missing and what has changed that gfortran/gcc no longer search in the default paths for but libraries and headers/modules?
EDIT
Just found that the standalone executable that uses similar code as the python extension and also uses eccodes has a similar issue. If I do not include INCLUDE_DIRECTORIES(/opt/homebrew/include) in CMakeLists.txt , I get:
cd <project_dir>/buildDebug/src/collocEHS && /opt/homebrew/bin/gfortran -I<project_dir>/buildDebug -I<project_dir>/include -I<project_dir>/src/readASTERIX2 -I<project_dir>/src/geomag70_linux -I<project_dir>/src/libDTG -fallow-argument-mismatch -ffpe-trap=invalid,zero,overflow -DPREC32 -DLINUX -DIS_LITTLE_ENDIAN -DUSEWALLTIME -DHAS_BLAS -DHAS_LAPACK -DGRIB32 -DTIMING -ffixed-line-length-none -g -fcheck=all -Wall -fcheck=bounds -O0 -g -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk -c <project_dir>/src/pynwp/readAtmosphereGen.f90 -o CMakeFiles/collocEHSv2.dir/__/pynwp/readAtmosphereGen.f90.o
<project_dir>/src/pynwp/readAtmosphereGen.f90:3:7:
3 | use eccodes
| 1
Fatal Error: Cannot open module file 'eccodes.mod' for reading at (1): No such file or directory
compilation terminated.
make[2]: *** [src/collocEHS/CMakeFiles/collocEHSv2.dir/__/pynwp/readAtmosphereGen.f90.o] Error 1
make[1]: *** [src/collocEHS/CMakeFiles/collocEHSv2.dir/all] Error 2
make: *** [all] Error 2
So I guess the problem is unrelated to python but more with gcc/gfortran (gcc version 11.2.0 (Homebrew GCC 11.2.0_3).
EDIT 2
A reboot of the laptop fixed the issue with the python extension build and setup.py requiring additional directories. For normal builds using CMake, I still require the extra INCLUDE_DIRECTORIES and LINK_DIRECTORIES order for gcc/gfortran to find libraries installed by brew in /opt/homebrew (or /usr/local for intel MacBook).
As per homebrew devs, this is desired behaviour: /opt/homebrew and /usr/local are "special" directories to be manually added in e.g., CMake projects. This is explained in my bug report on home-brew's GitHub, see https://github.com/Homebrew/homebrew-core/issues/95561.
I haven't been able to confirm this with documentation.

ERROR: Could not build wheels for pymssql, which is required to install pyproject.toml-based projects In Mac M1

I`m using MacBook with M1 chip and seems like multiple things arent optimised for it.
pyodbc didnt work for me, so I wanted to use pymssql.
Though, I encountered this issue when I tried to run pip install pymssql.
The error is as below.
Using cached pymssql-2.2.2.tar.gz (170 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pymssql
Building wheel for pymssql (pyproject.toml) ... error
ERROR: Command errored out with exit status 1:
Your project path and someinfo about it.
Complete output (25 lines):
setup.py: platform.system() => Darwin
setup.py: platform.architecture() => ('64bit', '')
setup.py: platform.libc_ver() => ('', '')
setup.py: include_dirs => []
setup.py: library_dirs => []
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.9-universal2-3.9
creating build/lib.macosx-10.9-universal2-3.9/pymssql
copying src/pymssql/__init__.py -> build/lib.macosx-10.9-universal2-3.9/pymssql
running build_ext
cythoning src/pymssql/_mssql.pyx to src/pymssql/_mssql.c
cythoning src/pymssql/_pymssql.pyx to src/pymssql/_pymssql.c
building 'pymssql._mssql' extension
creating build/temp.macosx-10.9-universal2-3.9
creating build/temp.macosx-10.9-universal2-3.9/src
creating build/temp.macosx-10.9-universal2-3.9/src/pymssql
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -I/Users/lakshayrohilla/SMS Project Files /cracs-backend/.venv/include -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/pymssql/_mssql.c -o build/temp.macosx-10.9-universal2-3.9/src/pymssql/_mssql.o -DMSDBLIB
src/pymssql/_mssql.c:682:10: fatal error: 'sqlfront.h' file not found
#include "sqlfront.h"
^~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/gcc' failed with exit code 1
----------------------------------------
**ERROR: Failed building wheel for pymssql**
Failed to build pymssql
**ERROR: Could not build wheels for pymssql, which is required to install pyproject.toml-based projects**
On trying loads of solutions for fixing this issue, Seems like something worked out for me.
I`m providing the code below for solving this issue.
Important Note:
Change the path as per your system.
1. brew install freetds
2. brew install openssl
3. export LDFLAGS="-L/opt/homebrew/Cellar/freetds/1.3.3/lib -L/opt/homebrew/Cellar/openssl#1.1/1.1.1l_1/lib"
4. export CFLAGS="-I/opt/homebrew/Cellar/freetds/1.3.3/include"
5. pip install pymssql
Just run the above commands & it should solve your issue, as it worked out for me.
Running the following commands fixed my issue
$ brew install freetds openssl
$ echo 'export LDFLAGS="-L/opt/homebrew/opt/freetds/lib -L/opt/homebrew/opt/openssl#3/lib"' >> ~/.zshrc
$ echo 'export CFLAGS="-I/opt/homebrew/opt/freetds/include"' >> ~/.zshrc
$ echo 'export CPPFLAGS="-I/opt/homebrew/opt/openssl#3/include"' >> ~/.zshrc
$ source ~/.zshrc
$ pip3 install pymssql

npx pod-install error. Aborting run and An unexpected error was encountered

When I successfully installed create-react-native-app without getting an error, This warning showed up and when I type that, the terminal gave me an error or warning like that: An unexpected error was encountered. Please report it as a bug:
Is there anyone who got code this error code or like that? Please help me to be able to solve this problem.
⚠️ Before running your app on iOS, make sure you have CocoaPods installed and initialize the project:
cd travel-app-react-native/ios
npx pod-install
oguzhanatalay#Oguzhans-Mac Desktop % cd travel-app-react-native
oguzhanatalay#Oguzhans-Mac travel-app-react-native % npx pod-install
npx: installed 1 in 6.118s
Scanning for pods...
1.10.0
> pod install
Installing unimodules:
expo-constants#9.2.0 from ../node_modules/expo-constants/ios
expo-error-recovery#1.3.0 from ../node_modules/expo-error-recovery/ios
expo-file-system#9.2.0 from ../node_modules/expo-file-system/ios
expo-font#8.3.0 from ../node_modules/expo-font/ios
expo-image-loader#1.2.0 from ../node_modules/expo-image-loader/ios
expo-keep-awake#8.3.0 from ../node_modules/expo-keep-awake/ios
expo-linear-gradient#8.3.1 from ../node_modules/expo-linear-gradient/ios
expo-location#9.0.1 from ../node_modules/expo-location/ios
expo-permissions#9.3.0 from ../node_modules/expo-permissions/ios
expo-splash-screen#0.6.2 from ../node_modules/expo-splash-screen/ios
expo-sqlite#8.4.0 from ../node_modules/expo-sqlite/ios
expo-updates#0.3.5 from ../node_modules/expo-updates/ios
unimodules-app-loader#1.3.0 from ../node_modules/unimodules-app-loader/ios
unimodules-barcode-scanner-interface#5.3.0 from ../node_modules/unimodules-barcode-scanner-interface/ios
unimodules-camera-interface#5.3.0 from ../node_modules/unimodules-camera-interface/ios
unimodules-constants-interface#5.3.0 from ../node_modules/unimodules-constants-interface/ios
unimodules-core#5.5.1 from ../node_modules/#unimodules/core/ios
unimodules-face-detector-interface#5.3.0 from ../node_modules/unimodules-face-detector-interface/ios
unimodules-file-system-interface#5.3.0 from ../node_modules/unimodules-file-system-interface/ios
unimodules-font-interface#5.3.0 from ../node_modules/unimodules-font-interface/ios
unimodules-image-loader-interface#5.3.0 from ../node_modules/unimodules-image-loader-interface/ios
unimodules-permissions-interface#5.3.0 from ../node_modules/unimodules-permissions-interface/ios
unimodules-react-native-adapter#5.6.0 from ../node_modules/#unimodules/react-native-adapter/ios
unimodules-sensors-interface#5.3.0 from ../node_modules/unimodules-sensors-interface/ios
unimodules-task-manager-interface#5.3.0 from ../node_modules/unimodules-task-manager-interface/ios
Auto-linking React Native modules for target `travelappreactnative`: RNGestureHandler, RNReanimated, and RNScreens
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
Fetching podspec for `Folly` from `../node_modules/react-native/third-party-podspecs/Folly.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
Downloading dependencies
Installing CocoaAsyncSocket (7.6.4)
Installing CocoaLibEvent (1.0.0)
Installing DoubleConversion (1.1.6)
Installing EXConstants (9.2.0)
Installing EXErrorRecovery (1.3.0)
Installing EXFileSystem (9.2.0)
Installing EXFont (8.3.0)
Installing EXImageLoader (1.2.0)
Installing EXKeepAwake (8.3.0)
Installing EXLinearGradient (8.3.1)
Installing EXLocation (9.0.1)
Installing EXPermissions (9.3.0)
Installing EXSQLite (8.4.0)
Installing EXSplashScreen (0.6.2)
Installing EXUpdates (0.3.5)
Installing FBLazyVector (0.63.3)
Installing FBReactNativeSpec (0.63.3)
Installing Flipper (0.54.0)
Installing Flipper-DoubleConversion (1.1.7)
Installing Flipper-Folly (2.3.0)
Installing Flipper-Glog (0.3.6)
[!] /bin/bash -c
set -e
#!/bin/bash
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
set -e
PLATFORM_NAME="${PLATFORM_NAME:-iphoneos}"
CURRENT_ARCH="${CURRENT_ARCH}"
if [ -z "$CURRENT_ARCH" ] || [ "$CURRENT_ARCH" == "undefined_arch" ]; then
# Xcode 10 beta sets CURRENT_ARCH to "undefined_arch", this leads to incorrect linker arg.
# it's better to rely on platform name as fallback because architecture differs between simulator and device
if [[ "$PLATFORM_NAME" == *"simulator"* ]]; then
CURRENT_ARCH="x86_64"
else
CURRENT_ARCH="armv7"
fi
fi
export CC="$(xcrun -find -sdk $PLATFORM_NAME cc) -arch $CURRENT_ARCH -isysroot $(xcrun -sdk $PLATFORM_NAME --show-sdk-path)"
export CXX="$CC"
# Remove automake symlink if it exists
if [ -h "test-driver" ]; then
rm test-driver
fi
./configure --host arm-apple-darwin
# Fix build for tvOS
cat << EOF >> src/config.h
/* Add in so we have Apple Target Conditionals */
#ifdef __APPLE__
#include <TargetConditionals.h>
#include <Availability.h>
#endif
/* Special configuration for AppleTVOS */
#if TARGET_OS_TV
#undef HAVE_SYSCALL_H
#undef HAVE_SYS_SYSCALL_H
#undef OS_MACOSX
#endif
/* Special configuration for ucontext */
#undef HAVE_UCONTEXT_H
#undef PC_FROM_UCONTEXT
#if defined(__x86_64__)
#define PC_FROM_UCONTEXT uc_mcontext->__ss.__rip
#elif defined(__i386__)
#define PC_FROM_UCONTEXT uc_mcontext->__ss.__eip
#endif
EOF
# Prepare exported header include
EXPORTED_INCLUDE_DIR="exported/glog"
mkdir -p exported/glog
cp -f src/glog/log_severity.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/logging.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/raw_logging.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/stl_logging.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/vlog_is_on.h "$EXPORTED_INCLUDE_DIR/"
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-apple-darwin-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... ./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)... yes
checking whether make supports nested variables... yes
checking for arm-apple-darwin-gcc... /Library/Developer/CommandLineTools/usr/bin/cc -arch armv7 -isysroot
checking whether the C compiler works... no
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: unable to lookup item 'Path' in SDK 'iphoneos'
/Users/oguzhanatalay/Library/Caches/CocoaPods/Pods/Release/Flipper-Glog/0.3.6-1dfd6/missing: Unknown `--is-lightweight' option
Try `/Users/oguzhanatalay/Library/Caches/CocoaPods/Pods/Release/Flipper-Glog/0.3.6-1dfd6/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
configure: error: in `/Users/oguzhanatalay/Library/Caches/CocoaPods/Pods/Release/Flipper-Glog/0.3.6-1dfd6':
configure: error: C compiler cannot create executables
See `config.log' for more details
Aborting run
An unexpected error was encountered. Please report it as a bug:
Error
at CocoaPodsPackageManager._installAsync (/Users/oguzhanatalay/.npm/_npx/4500/lib/node_modules/pod-install/build/index.js:2:85721)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
I believe the error lies with this error statement:
xcrun: error: SDK "iphoneos" cannot be located
Taken from a github thread for an old issue, try these steps:
run this command:
xcrun -k --sdk iphoneos --show-sdk-path
if the output is:
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: unable to lookup item 'Path' in SDK 'iphoneos'
then run this: sudo xcode-select --switch /Applications/Xcode.app
Then install pod again.

RedHat MultiNest: failed install, issue with CMake/BLAS/LAPACK (or pthreads)

I am trying to install MultiNest on my desktop running Enterprise Red Hat 6.6 (Santiago). I downloaded the necessary package (MultiNest_v3.9_CMake.tar.gz), and followed the installation instructions:
cd MultiNest/build
cmake ..
Although BLAS and LAPACK are installed, I get the following errors:
CMake Error at /usr/share/cmake/Modules/FindBLAS.cmake:594 (message):
A required library with BLAS API not found. Please specify library
location.
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindLAPACK.cmake:142 (find_package)
src/CMakeLists.txt:31 (FIND_PACKAGE)
-- Configuring incomplete, errors occurred!
See also "/home/ianc/Downloads/MultiNest/build/CMakeFiles/CMakeOutput.log".
See also "/home/ianc/Downloads/MultiNest/build/CMakeFiles/CMakeError.log".
Any suggestions?
The output "CmakeError.log" is below, and seems to indicate that the problem instead involves something called "pthreads".
Determining if the pthread_create exist failed with the following output:
Change Dir: /home/ianc/Downloads/MultiNest/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/gmake" "cmTryCompileExec4203479411/fast"
/usr/bin/gmake -f CMakeFiles/cmTryCompileExec4203479411.dir/build.make CMakeFiles/cmTryCompileExec4203479411.dir/build
gmake[1]: Entering directory /home/ianc/Downloads/MultiNest/build/CMakeFiles/CMakeTmp'
/usr/local/bin/cmake -E cmake_progress_report /home/ianc/Downloads/MultiNest/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec4203479411.dir/CheckSymbolExists.c.o
/usr/local/Ureka/python/bin/gcc -o CMakeFiles/cmTryCompileExec4203479411.dir/CheckSymbolExists.c.o -c /home/ianc/Downloads/MultiNest/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTryCompileExec4203479411
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec4203479411.dir/link.txt --verbose=1
/usr/local/Ureka/python/bin/gcc CMakeFiles/cmTryCompileExec4203479411.dir/CheckSymbolExists.c.o -o cmTryCompileExec4203479411 -rdynamic
CMakeFiles/cmTryCompileExec4203479411.dir/CheckSymbolExists.c.o: In functionmain':
CheckSymbolExists.c:(.text+0xc): undefined reference to pthread_create'
collect2: ld returned 1 exit status
gmake[1]: Leaving directory/home/ianc/Downloads/MultiNest/build/CMakeFiles/CMakeTmp'
gmake[1]: * [cmTryCompileExec4203479411] Error 1
gmake: * [cmTryCompileExec4203479411/fast] Error 2
File /home/ianc/Downloads/MultiNest/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
include
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/ianc/Downloads/MultiNest/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/gmake" "cmTryCompileExec3959414027/fast"
/usr/bin/gmake -f CMakeFiles/cmTryCompileExec3959414027.dir/build.make CMakeFiles/cmTryCompileExec3959414027.dir/build
gmake[1]: Entering directory /home/ianc/Downloads/MultiNest/build/CMakeFiles/CMakeTmp'
/usr/local/bin/cmake -E cmake_progress_report /home/ianc/Downloads/MultiNest/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec3959414027.dir/CheckFunctionExists.c.o
/usr/local/Ureka/python/bin/gcc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTryCompileExec3959414027.dir/CheckFunctionExists.c.o -c /usr/local/share/cmake-3.1/Modules/CheckFunctionExists.c
Linking C executable cmTryCompileExec3959414027
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec3959414027.dir/link.txt --verbose=1
/usr/local/Ureka/python/bin/gcc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTryCompileExec3959414027.dir/CheckFunctionExists.c.o -o cmTryCompileExec3959414027 -rdynamic -lpthreads
/usr/bin/ld: cannot find -lpthreads
collect2: ld returned 1 exit status
gmake[1]: Leaving directory/home/ianc/Downloads/MultiNest/build/CMakeFiles/CMakeTmp'
gmake[1]: * [cmTryCompileExec3959414027] Error 1
gmake: * [cmTryCompileExec3959414027/fast] Error 2
Install these libraries and their devel versions for the build headers
libblas{3,-dev} liblapack{3,-dev} libatlas{3-base,-dev} cmake build-essential gfortran
You can also try installing compat packages.
The error above indicates that the POSIX threading library, libpthreads, cannot be found on your system. This error originates from your system-provided FindLAPACK.cmake script rather than from something in the MultiNest package.
I don't know the specific library which provides this on RedHat, but you should be able to check using yum provides pthread. After this you can install it using yum install M where M is whatever library provides libpthread from the previous command.

Install nullfs on Debian

I am using a java program. It automatically creates log files in a directory, but I am doing that myself a different way with tee. I cannot find an easy way to disable the logs, so I am resorting to using nullfs.
I cloned it with
git clone https://github.com/xrgtn/nullfs.git
and I ran
make nul1fs
as instructed. It terminates within a second, with the following output:
cc "-lfuse" nul1fs.c -o nul1fs
nul1fs.c:13:18: fatal error: fuse.h: No such file or directory
compilation terminated.
make: *** [nul1fs] Error 1
I tried apt-get source fuse and copying fuse.h into the nullfs directory, but nothing changed.
I have FUSE installed. I'm running Debian wheezy x86_64.
You need the development package of FUSE, which contains the fuse.h you're missing. Do a apt-get install libfuse-dev and it should work.
Copying the header file in the source directory did not work, because in nul1fs.c you'll notice that fuse.h is included with angle brackets. This means, the header file will be searched in the system-wide include paths. That usually means /usr/include.
Note that you then may run into this error:
$ make nul1fs
cc "-lfuse" nul1fs.c -o nul1fs
/tmp/ccbt0X7c.o: In function `main':
nul1fs.c:(.text+0x3c3): undefined reference to `fuse_main_real'
collect2: error: ld returned 1 exit status
make: *** [nul1fs] Error 1
It's a documented bug with a workaround: put the linker flags after the file lists. I.e. compile nul1fs with:
cc nul1fs.c -o nul1fs -lfuse
and not with make nul1fs, which boils down to
cc -lfuse nul1fs.c -o nul1fs

Resources