My objective
I want to compile and install nfs-ganesha from source on a Oracle Linux machine.
Steps to reproduce
Using Oracle Linux Server release 7.4
Download nfs-ganesha from github: https://github.com/nfs-ganesha/nfs-ganesha
Follow steps from line 56 to 61 on this guide (just a normal compilation and installation): https://github.com/nfs-ganesha/nfs-ganesha/blob/next/src/COMPILING_HOWTO.txt
At some point, you might receive an error that you're missing userspace-rcu. Do sudo yum install userspace-rcu userspace-rcu-devel to fix it.
When I run the last command (make install) I get the following error:
Error
bash-4.2$ make install
[ 3%] Built target MainServices
normal build output...
[100%] Built target fsalmem
Install the project...
-- Install configuration: "Debug"
-- Installing: /etc/ganesha/ganesha.conf
CMake Error at cmake_install.cmake:54 (configure_file):
configure_file Problem configuring file
make: *** [install] Error 1
Some insights
I opened cmake_install.cmake to see what is failing, here is a fragment of the code:
I marked the faulty line with an arrow
IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
set(_destfile "/etc/ganesha/ganesha.conf")
if (NOT "$ENV{DESTDIR}" STREQUAL "")
# prepend install root prefix with install-time DESTDIR
set(_destfile "$ENV{DESTDIR}//etc/ganesha/ganesha.conf")
endif ()
if (EXISTS ${_destfile})
message(STATUS "Skipping: ${_destfile} (already exists)")
execute_process(COMMAND "/usr/bin/cmake" -E compare_files
/home/carlhida/Documents/ganesha/src/config_samples/ganesha.conf.example ${_destfile} RESULT_VARIABLE _diff)
if (NOT "${_diff}" STREQUAL "0")
message(STATUS "Installing: ${_destfile}.example")
configure_file(/home/carlhida/Documents/ganesha/src/config_samples/ganesha.conf.example ${_destfile}.example COPYONLY)
endif ()
else ()
message(STATUS "Installing: ${_destfile}")
# install() is not scriptable within install(), and
# configure_file() is the next best thing
-------->>> configure_file(/home/carlhida/Documents/ganesha/src/config_samples/ganesha.conf.example ${_destfile} COPYONLY)
# TODO: create additional install_manifest files?
endif ()
ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
What I found on this function is that it copies one file to another, but I'm not sure how to get more information from the error. My main concern is that it might have to do with permissions but when I use sudo, I just get:
bash-4.2$ sudo make install
CMake Error: The source directory "/home/carlhida/Documents/ganesha/src" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
make: *** [cmake_check_build_system] Error 1
So I think it is not related to that.
Pivoting questions
Is there a way to know what exactly is the problem with those files? I would really appreciate if anyone knows how to get a verbose output on those errors.
Thank you for your help!
I solved this problem by moving the repo's folder and the build folder to a directory called /scratch. Then I issued the command again by being root. It installed correctly this time.
Related
We would like to integrate hugo for documentation generation in our automake project.
The problem i'm facing is, that I would like to support
out-of-tree builds
builds from read-only source trees (which is related to out-of-tree builds)
out-of-tree builds kind of work with:
hugo --source $(srcdir) --destination $(abs_builddir)
However, when my source-tree is read-only (e.g. as tested by make distcheck), this fails with:
$ make
hugo --source ../../../hugo --destination "<<SRCDIR>>/project-0.1/_build/sub/hugo"
Error: add site dependencies: create deps: failed to create file caches from configuration: mkdir <<SRCDIR>>/project-0.1/hugo/resources: permission denied
Total in 1 ms
make: *** [Makefile:555: all] Error 255
Obviously, hugo tries to create it's "file caches" as a resources/ directory in the (read-only) <<SRCDIR>>.
How can I tell hugo to creat this "file caches" directory in an alternative (writeable) place?
I tried setting --cacheDir (to $(abs_builddir), but this didn't change anything.
apparently there's a resourceDir config-file option, but afaict that is not available via the cmdline (and I don't know whether it would actually help).
I have created a chaincode and I am trying to install it on the peer organization. I am able to package the chaincode on the peer organization but when it turns to install phase, I got error message:
Error: chaincode install failed with status: 500 - failed to invoke backing implementation of 'InstallChaincode': could not build chaincode: docker build failed: docker image build failed: docker build failed: Error returned from build: 2
# github.com/Nik-U/pbc
/usr/lib/gcc/x86_64-alpine-linux-musl/9.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -lpbc
/usr/lib/gcc/x86_64-alpine-linux-musl/9.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -lgmp
collect2: error: ld returned 1 exit status
I am using Nik-U's go wrapper of the PBC library Nik-U pbc. In his homepage, description shows:
This package must be compiled using cgo. It also requires the installation of GMP and PBC. During the build process, this package will attempt to include <gmp.h> and <pbc/pbc.h>, and then dynamically link to GMP and PBC.
Here's what I have tried:
I have manually configured the GMP and PBC under the Nik-U's directory and changed all the addresses of <gmp.h> and <pbc.h> to the right location.
I have tried to use command ln -s /usr/local/lib/libpbc.so libpbc.so and ln -s /usr/local/lib/libgmp.so to create link library files, but it shows the same error message.
As the Nik-U wrapper uses cgo, I changed the sentence in c.go file from #cgo LDFLAGS: -lpbc -lgmp to #cgo LDFLAGS: -L/usr/local/lib -lpbc -lgmp. Inside the /usr/loca/lib there are: libgmp.a libgmp.la libgmp.so libgmp.so.10 libgmp.so.10.4.1 libpbc.a libpbc.la libpbc.so libpbc.so.1 libpbc.so.1.0.0. This change did not work. I still got the same error message.
I copied all files of the directory /usr/local/lib to the same directory of the docker container using command docker cp **.so containerName:/usr/local/lib/. It does not work.
Here are what I doubt that may be the problem:
I am using go.mod file to manage all dependencies but the go.mod does not manage the original PBC library and GMP library. However, I do not know how to use go module to manage these two libraries (written in C?).
Nik-U's pbc wrapper has to link PBC and GMP libraries dynamically, which is why my efforts to manually configure and install them in the subdirectory, and change the include information such as from #include <pbc/pbc.h> to #include <pbc-0.5.14/include/pbc.h> of no use.
Can anybody help..
In hyperledger fabric, chaincode is executed in the form of sandbox based on virtual environment. In other words, it is not executed in the peer, but in a new docker container.
Even if you move the *.so file to the peer, it seems that a cannot find error has occurred because the newly created chaincode does not import it.
To solve this, two tasks are required.
1. import library to fabric-ccenv docker image
The go chaincode container of the fabric occurs in the image of fabric-ccenv. Based on the fabric-ccenv image, create a new image with your library embedded
FROM fabric-ccenv:<your_fabric_tag>
COPY <your_src_library_path> <your_target_library_path>
docker build -f <your_dockerfile> -t fabric-ccenv:<your_new_fabric_tag>
2. Change core.yaml of fabric-peer
You have to change the peer's configuration. That is, set the configuration for chaincode in core.yaml.
You can set information about fabric-ccenv in the builder item of chaincode. Change this value to the value of your image created in step 1 above.
chaincode:
id:
path:
name:
#builder: $(DOCKER_NS)/fabric-ccenv:$(TWO_DIGIT_VERSION)
builder: $(DOCKER_NS)/fabric-ccenv:<your_new_fabric_tag>
pull: false
golang:
runtime: $(DOCKER_NS)/fabric-baseos:$(TWO_DIGIT_VERSION)
dynamicLink: false
Currently I am having problems with loading an R package that I downloaded from github (https://github.com/hafen/operator). I downloaded the package and put it in my local R folder: "C:/..../Documents/R/win-library/3.2/operator".
However, I have not been able to load said package into R. I keep on receiving the following errors when trying to load the package. Can anyone help me. I found an error that I though was somewhat relevant that suggest updating "Rcpp" which I have already done with no success. Thank you in advance for any and all help!
I should add. I looked into this a bit more and realized the issue I am having is revolving around the C script that is contained within the package. If I remove the C script I can load the package, however, some of the package functions are dependent on the script and will not run as a result.
> require(operator)
Loading required package: operator
Failed with error: ‘‘operator’ is not a valid installed package’
or
> devtools::load_all("C:/..../Documents/R/win-library/3.2/operator")
Loading operator
Re-compiling operator
"C:/PROGRA~1/R/R-32~1.2/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL \
"C:\Users\blakey1\Documents\R\win-library\3.2\operator" \
--library="C:\Users\blakey1\AppData\Local\Temp\Rtmpe611i9\devtools_install_499c5059149c" --no-R --no-data \
--no-help --no-demo --no-inst --no-docs --no-exec --no-multiarch --no-test-load
* installing *source* package 'operator' ...
** libs
Warning: running command 'make -f "C:/PROGRA~1/R/R-32~1.2/etc/x64/Makeconf" -f "C:/PROGRA~1/R/R-32~1.2/share/make/winshlib.mk" SHLIB="operator.dll" WIN=64 TCLBIN=64 OBJECTS="loess_op.o"' had status 127
ERROR: compilation failed for package 'operator'
* removing 'C:/Users/blakey1/AppData/Local/Temp/Rtmpe611i9/devtools_install_499c5059149c/operator'
Error: Command failed (1)
I was facing the same issue with RTextTools, as RTextTools is now not available on CRAN.
I have Download RTextTools From Given Link
https://cran.r-project.org/src/contrib/Archive/RTextTools/
and copy
RTextTools_1.4.2.tar.gz file in project root folder
then
run this command in project folder in terminal
"R CMD INSTALL RTextTools_1.4.2.tar.gz"
After running this command I receive below error
"ERROR: dependencies ‘SparseM’, ‘randomForest’, ‘tree’, ‘e1071’, ‘ipred’, ‘caTools’, ‘maxent’, ‘glmnet’, ‘tau’ are not available for package ‘RTextTools’"
Now install each dependencies from RStudio or RConsole (Any Editor used by you) by simply running this code
install.packages("caTools")
Install all 9 required packages One By One (In My Case it was 9 Packages Dependencies required by RTextTools)
all packages will be installed except 'maxent'
Now download maxent from the given link
https://cran.r-project.org/src/contrib/Archive/maxent/
and copy maxent_1.3.3.1.tar file in project folder then
run this command in project folder in terminal
"R CMD INSTALL maxent_1.3.3.1.tar"
Now For RTextTools Run this command again in Terminal
"R CMD INSTALL RTextTools_1.4.2.tar.gz"
All is done Now..
But the Last Step is
Load the RTextTools using
library(RTextTools)
You will see one more Error: Load SparseM
Now Loading SparseM use code below
library(SparseM)
and in the last Load RTextTools
library(RTextTools)
I'm trying to build ct-ng in crosstool-ng-1.9.3 on my 64 bit ubuntu 13.04 but I repeatedly receive the following error during this command :
./ct-ng build
[INFO ] Retrieving needed toolchain components' tarballs
[ERROR] Could not retrieve 'cloog-ppl-0.15.10'.
[07:00] / make: *** [build] Error 1
Does anyone have any clue how to resolve it?
It's hard to say without seeing the full build.log file.
I'm going to guess and say it's failing at the point where it downloads that tar.
I would do the following (based on my assumption):
Delete the cloog-ppl-0.15.10.tar.bz stump in /some/path/.../.build/tarfiles
Download the tar manually.
You can either place the tar file in that location or in ./ct-ng menuconfig
Tell it to look at a directory locally.
I have trouble installing PHP, MySQL and Apache2 using MacPorts. Currently my OS is Mavericks and i'm downloading the official binary package for mavericks (also tried compile from source and running selfupdate) but I got this error message:
---> Building readline
Error: org.macports.build for port readline returned: command execution failed
Error: Failed to install readline
Please see the log file for port readline for details:
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_readline/readline/main.log
Error: The following dependencies were not installed: apache2 apr-util mysql5 readline tcp_wrappers sqlite3 libedit pcre bzip2 autoconf213 gawk xz m4 gsed libtool libxml2 mhash pkgconfig
To report a bug, follow the instructions in the guide:
http://guide.macports.org/#project.tickets
Error: Processing of port php5 failed
How can I solve this?
Thanks
Can you please check the error message block within the log file:
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_readline/readline/main.log
Also make sure xcode command line tools are installed.
FYI: I faced similar error in Mavericks. My case was:
opt is a different partition which is mounted in /Volumes/opt
/opt is a symbolic link to /Volumes/opt.
It has been solved after editing /opt/local/etc/macports/macports.conf by replacing /opt with /Volumes/opt. Note sure this can help your case.