I am trying to install mod_wsgi for a updated version of Apache.
I currently have Apache 2.4 installed via /opt/rh/httpd24/root/etc/httpd.
I am wanting to compile with it using 2.4 not 2.2. Any help on the syntax here? I can't find any reference to that specific argument.
[root#bmograba mod_wsgi-4.4.13]# ./configure -help
`configure' configures this package to adapt to many kinds of systems.
Usage: ./configure [OPTION]... [VAR=VALUE]...
To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE. See below for descriptions of some of the useful variables.
Defaults for the options are specified in brackets.
Configuration:
-h, --help display this help and exit
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
-q, --quiet, --silent do not print `checking ...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for `--cache-file=config.cache'
-n, --no-create do not create output files
--srcdir=DIR find the sources in DIR [configure dir or `..']
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
[/usr/local]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[PREFIX]
By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc. You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.
For better control, use the options below.
Fine tuning of the installation directories:
--bindir=DIR user executables [EPREFIX/bin]
--sbindir=DIR system admin executables [EPREFIX/sbin]
--libexecdir=DIR program executables [EPREFIX/libexec]
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
--datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
--datadir=DIR read-only architecture-independent data [DATAROOTDIR]
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
--docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
--psdir=DIR ps documentation [DOCDIR]
Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-framework enable mod_wsgi framework link
--disable-embedded disable mod_wsgi embedded mode
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-apxs=NAME name of the apxs executable [[apxs]]
--with-python=NAME name of the python executable [[python]]
Some influential environment variables:
CC C compiler command
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
LIBS libraries to pass to the linker, e.g. -l<library>
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
Report bugs to the package provider.
Compiled plane with no arguments:
[root#bmograba mod_wsgi-4.4.13]# ./configure
checking for apxs2... no
checking for apxs... /usr/sbin/apxs
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
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 gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for prctl... yes
checking Apache version... 2.2.15
checking for python... /usr/bin/python
configure: creating ./config.status
config.status: creating Makefile
Just to see what package output would be looking for:
[root#bmograba mod_wsgi-4.4.13]# ./configure --with-PACKAGE
configure: WARNING: you should use --build, --host, --target
configure: WARNING: unrecognized options: --with-PACKAGE
checking for apxs2... no
checking for apxs... /usr/sbin/apxs
checking for httpd-gcc... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
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 gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for prctl... yes
checking Apache version... 2.2.15
checking for python... /usr/bin/python
configure: creating ./config.status
config.status: creating Makefile
configure: WARNING: unrecognized options: --with-PACKAGE
When they say, --with-PACKAGE, PACKAGE is just a placeholder for a package name. You aren't supposed to literally put --with-PACKAGE.
Find where the 'apxs' script is inside of the alternate Apache installation. Then run:
./configuure --with-apxs /opt/rh/httpd24/bin/apxs
where that argument is the location of that 'apxs' script.
https://code.google.com/p/modwsgi/wiki/QuickInstallationGuide#Configuring_The_Source_Code
Related
I'm trying to build the open-source software LMGC90 (https://git-xen.lmgc.univ-montp2.fr/lmgc90/lmgc90_user/-/wikis/compilation) and I have a trouble when I try to use the command >cmake. Details are below:
CMake Error: The following variables are used in this project, but
they are set to NOTFOUND. Please set them or make sure they are set
and tested correctly in the CMake files: PYTHON_LIBRARY
linked by target "ann_manh" in directory /home/tphan/lmgc90_user_2021.rc1/src/contribs/ann-1.1.2/wrap
linked by target "ann_eucl" in directory /home/tphan/lmgc90_user_2021.rc1/src/contribs/ann-1.1.2/wrap
linked by target "lmgc90" in directory /home/tphan/lmgc90_user_2021.rc1/src/ChiPy
The full error message is:
tphan#tphan-XPS-15-9570:~/lmgc90_user_2021.rc1/build$ cmake .. -DPYTHON_EXECUTABLE=/usr/bin/python3
-- You try to build LMGC90_dev
fatal: not a git repository (or any of the parent directories): .git
-- Building git branch
-- A library with LAPACK API found.
-- Found Python executable: /usr/bin/python3.8
-- Found Python library: PYTHON_LIBRARY-NOTFOUND
-- Python version is : 3.8.10
-- Python include dir is : /usr/include/python3.8
-- Cython not found... deactivate rTree Python binding
-- Matlib Library used : /home/tphan/lmgc90_user_2021.rc1/build/lib/libmatlib.so
-- Sparse linear algebra include path found: /home/tphan/lmgc90_user_2021.rc1/build/include
-- Sparse linear algebra libraries found: /home/tphan/lmgc90_user_2021.rc1/build/lib/libdmumps.so
-- Sparse linear algebra binding found: /home/tphan/lmgc90_user_2021.rc1/src/contribs/Mumps_SparseLinearAlgebra.f90
-- matlib library : /home/tphan/lmgc90_user_2021.rc1/build/lib/libmatlib.so
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
PYTHON_LIBRARY
linked by target "ann_manh" in directory /home/tphan/lmgc90_user_2021.rc1/src/contribs/ann-1.1.2/wrap
linked by target "ann_eucl" in directory /home/tphan/lmgc90_user_2021.rc1/src/contribs/ann-1.1.2/wrap
linked by target "lmgc90" in directory /home/tphan/lmgc90_user_2021.rc1/src/ChiPy
-- Configuring incomplete, errors occurred!
See also "/home/tphan/lmgc90_user_2021.rc1/build/CMakeFiles/CMakeOutput.log".
See also "/home/tphan/lmgc90_user_2021.rc1/build/CMakeFiles/CMakeError.log".```
Do you know how I can fix this?
You must specify the path to the Python library as:
cmake .. -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.8.so
I am trying to write a bitbake file for a project with uses autotools to configure the Makefiles.
### tizonia.bb
SUMMARY = "Tizonia Library"
DESCRIPTION = "Tizonia"
LICENSE = "LGPL-3.0"
LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=e6a600fd5e1d9cbde2d983680233ad02"
SRC_URI = "git://github.com/tizonia/tizonia-openmax-il.git;protocol=https"
SRCREV = "9004bc40b89eeafb04b28fbb2b772e47dd62fdc9"
S = "${WORKDIR}/git"
DEPENDS = "python-dev python-setuptools mediainfo log4c python-pip python-soundcloud"
inherit autotools ccache pkgconfig python-dir pythonnative
RDEPENDS_${PN} = "libstdc++ dbus boost libgcc mediainfo log4c libspotify python-pip python-soundcloud"
### python-soundcloud.bb
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=31fa3a9dc818e0087893d63583d2d21a"
SRC_URI[md5sum] = "40c1d32afd019ed11ec1fbee3e84e31f"
SRC_URI[sha256sum] = "aad2003592cec945f835f158f7b41ba8bf805c5738a2fcc5629668ea1df653d5"
DEPENDS = "${PYTHON_PN}-modules"
PYPI_PACKAGE = "soundcloud"
inherit pypi setuptools
RDEPENDS_${PN} = "${PYTHON_PN}-modules"
In the do_configure step where the configure script is called, I get this error message:
| checking for python2.7... (cached) /home/developer/build-webos-ose/BUILD/sysroots/x86_64-linux/usr/bin/python-native/python
| checking for a version of Python >= '2.1.0'... yes
| checking for a version of Python >= '2.7'... yes
| checking for the distutils Python package... yes
| checking for Python include path... -I/home/developer/build-webos-ose/BUILD/sysroots/raspberrypi3/usr/include/python2.7
| checking for Python library path... -L/home/developer/build-webos-ose/BUILD/sysroots/raspberrypi3/usr/lib -lpython2.7
| checking for Python site-packages path... /home/developer/build-webos-ose/BUILD/sysroots/x86_64-linux/usr/lib/python2.7/site-packages
| checking python extra libraries... -lpthread -ldl -lpthread -lutil -lm
| checking python extra linking flags... -Xlinker -export-dynamic
| checking consistency of all components of python development environment... yes
| checking python module: soundcloud... no
| configure: error: failed to find required module soundcloud
As you can see, configure is using sysroots/x86_64-linux/usr/lib/python2.7/site-packages for finding modules, but the modules are installed in sysroots/raspberrypi3/usr/lib/python2.7/site-packages.
How can I set the site-packages path in autoconf/configure call so it points to the correct path?
Keep in mind that the configure script is executed on the HOST and it looks for tools that are needed for compilation on the HOST as well, hence what you need is to DEPEND on the python-soundcloud-NATIVE package (you might need to use BBCLASSEXTEND for this package to exist), meaning that what that package installs, will be populated automatically on recipe-sysroot-native/x86_64-linux/usr/lib/python2.7/site-packages (since it DEPENDs on it) which is what the configure script will read automatically as well.
I launched R in my command-line and typed the following:
install.packages("XML")
After selecting a mirror site, I saw the following output:
trying URL 'https://cloud.r-project.org/src/contrib/XML_3.98-1.4.tar.gz'
Content type 'application/x-gzip' length 1599214 bytes (1.5 MB)
==================================================
downloaded 1.5 MB
* installing *source* package ‘XML’ ...
** package ‘XML’ successfully unpacked and MD5 sums checked
checking for gcc... gcc
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 gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for sed... /usr/local/Library/ENV/4.3/sed
checking for pkg-config... /usr/local/bin/pkg-config
checking for xml2-config... /Users/richiethomas/anaconda/bin/xml2-config
USE_XML2 = yes
SED_EXTENDED_ARG: -E
Minor 9, Patch 2 for 2.9.2
Located parser file -I/Users/richiethomas/anaconda/include/libxml2/parser.h
Checking for 1.8: -I/Users/richiethomas/anaconda/include/libxml2
Using libxml2.*
checking for gzopen in -lz... yes
checking for xmlParseFile in -lxml2... yes
You are trying to use a version 2.* edition of libxml
but an incompatible library. The header files and library seem to be
mismatched. If you have specified LIBXML_INCDIR, make certain to also
specify an appropriate LIBXML_LIBDIR if the libxml2 library is not in the default
directories.
ERROR: configuration failed for package ‘XML’
* removing ‘/usr/local/lib/R/3.2/site-library/XML’
The downloaded source packages are in
‘/private/var/folders/jy/0cwn40p951xc7f1480z3sxzm0000gn/T/RtmpvWMrkH/downloaded_packages’
Warning message:
In install.packages("XML") :
installation of package ‘XML’ had non-zero exit status
I Googled around and found this link, which suggested running the 'which xmllint' command in the command line to find any XML installations which might conflict with the one R depends on. The output when I ran it was:
/Users/richiethomas/anaconda/bin/xmllint
Correct me if I'm wrong, but it appears that my Python installation has an XML dependency which conflicts with the one R wants to download. Is this right? And if so, how can I fix it so that both Python and R are installed on my machine?
EDIT: I am using OSX. I ran "brew install libxml2" but Homebrew said it was already installed.
EDIT #2: I tried un-installing and re-installing R via Homebrew, and I am still getting the same error.
EDIT #3: I ran "brew info libxml2" and saw that there is an "--with-python" flag which enables a build with Python support. I also noticed the following:
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
LDFLAGS: -L/usr/local/opt/libxml2/lib
CPPFLAGS: -I/usr/local/opt/libxml2/include
I ran "brew uninstall libxml2" and then "brew install libxml2 --with-python", and then set the above 2 environment variables using the "export" command. Then I re-ran R and again tried to install the XML package. I saw dozens of warnings of the type "passing argument to parameter here" (see below), followed by a non-zero exit code:
* installing *source* package ‘XML’ ...
** package ‘XML’ successfully unpacked and MD5 sums checked
checking for gcc... gcc
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 gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for sed... /usr/local/Library/ENV/4.3/sed
checking for pkg-config... /usr/local/bin/pkg-config
checking for xml2-config... /Users/richiethomas/anaconda/bin/xml2-config
USE_XML2 = yes
SED_EXTENDED_ARG: -E
Minor 9, Patch 2 for 2.9.2
Located parser file -I/Users/richiethomas/anaconda/include/libxml2/parser.h
Checking for 1.8: -I/Users/richiethomas/anaconda/include/libxml2
Using libxml2.*
checking for gzopen in -lz... yes
checking for xmlParseFile in -lxml2... yes
checking for xmlHashSize in -lxml2... yes
Using built-in xmlHashSize
Checking DTD parsing (presence of externalSubset)...
checking for xmlHashSize in -lxml2... yes
Found xmlHashSize
checking for xmlOutputBufferCreateBuffer in -lxml2... yes
have xmlOutputBufferCreateBuffer()
checking for xmlDocDumpFormatMemoryEnc in -lxml2... yes
checking libxml/xmlversion.h usability... yes
checking libxml/xmlversion.h presence... yes
checking for libxml/xmlversion.h... yes
Expat: FALSE
Checking for return type of xmlHashScan element routine.
No return value for xmlHashScan
xmlNs has a context field
Checking for cetype_t enumeration
Using recent version of R with cetype_t enumeration type for encoding
checking for xmlsec1-config... no
nodegc default
xml-debug default
Version has XML_WITH_ZLIB
Version has xmlHasFeature()
****************************************
Configuration information:
Libxml settings
libxml include directory: -I/Users/richiethomas/anaconda/include/libxml2
libxml library directory: -L/Users/richiethomas/anaconda/lib -lxml2 -lz -liconv -lm -lz -lxml2
libxml 2: -DLIBXML2=1
Compilation flags: -DLIBXML -I/Users/richiethomas/anaconda/include/libxml2 -DUSE_EXTERNAL_SUBSET=1 -DROOT_HAS_DTD_NODE=1 -DDUMP_WITH_ENCODING=1 -DUSE_XML_VERSION_H=1 -DXML_ELEMENT_ETYPE=1 -DXML_ATTRIBUTE_ATYPE=1 -DNO_XML_HASH_SCANNER_RETURN=1 -DLIBXML_NAMESPACE_HAS_CONTEXT=1 -DHAVE_R_CETYPE_T=1 -DHAVE_XML_WITH_ZLIB=1 -DHAVE_XML_HAS_FEATURE=1 -DUSE_R=1 -D_R_=1 -DHAVE_VALIDITY=1 -DXML_REF_COUNT_NODES=1
Link flags: -L/Users/richiethomas/anaconda/lib -lxml2 -lz -liconv -lm -lz -lxml2
****************************************
configure: creating ./config.status
config.status: creating src/Makevars
config.status: creating R/supports.R
config.status: creating inst/scripts/RSXML.csh
config.status: creating inst/scripts/RSXML.bsh
** libs
clang -I/usr/local/Cellar/r/3.2.4_1/R.framework/Resources/include -DNDEBUG -DLIBXML -I/Users/richiethomas/anaconda/include/libxml2 -DUSE_EXTERNAL_SUBSET=1 -DROOT_HAS_DTD_NODE=1 -DDUMP_WITH_ENCODING=1 -DUSE_XML_VERSION_H=1 -DXML_ELEMENT_ETYPE=1 -DXML_ATTRIBUTE_ATYPE=1 -DNO_XML_HASH_SCANNER_RETURN=1 -DLIBXML_NAMESPACE_HAS_CONTEXT=1 -DHAVE_R_CETYPE_T=1 -DHAVE_XML_WITH_ZLIB=1 -DHAVE_XML_HAS_FEATURE=1 -DUSE_R=1 -D_R_=1 -DHAVE_VALIDITY=1 -DXML_REF_COUNT_NODES=1 -I. -DLIBXML2=1 -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I/usr/local/include -fPIC -g -O2 -c DocParse.c -o DocParse.o
DocParse.c:375:60: warning: passing 'const char *' to parameter of type 'const xmlChar *' (aka 'const unsigned char *') converts between
pointers to integer types with different sign [-Wpointer-sign]
SET_STRING_ELT(VECTOR_ELT(rdoc, FILE_ELEMENT_NAME), 0, ENC_COPY_TO_USER_STRING(doc->name ? XMLCHAR_TO_CHAR(doc->name) : fileName));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./Utils.h:235:74: note: expanded from macro 'ENC_COPY_TO_USER_STRING'
#define ENC_COPY_TO_USER_STRING(x) CreateCharSexpWithEncoding(encoding, CHAR_TO_XMLCHAR (x))
^~~~~~~~~~~~~~~~~~~
./Utils.h:12:31: note: expanded from macro 'CHAR_TO_XMLCHAR'
#define CHAR_TO_XMLCHAR(val) ((xmlChar *) val)
^~~~~~~~~~~~~~~~~
./Utils.h:220:73: note: passing argument to parameter 'str' here
SEXP CreateCharSexpWithEncoding(const xmlChar *encoding, const xmlChar *str);
.....
/usr/local/Cellar/r/3.2.4_1/R.framework/Resources/include/Rinternals.h:822:28: note: passing argument to parameter here
SEXP Rf_mkChar(const char *);
^
schema.c:122:25: warning: passing 'const char *' to parameter of type 'const xmlChar *' (aka 'const unsigned char *') converts between pointers
to integer types with different sign [-Wpointer-sign]
p = xmlHashLookup(t, CHAR_DEREF(STRING_ELT(name, 0)));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./RSCommon.h:140:27: note: expanded from macro 'CHAR_DEREF'
#define CHAR_DEREF(x) CHAR((x))
^~~~~~~~~
/usr/local/Cellar/r/3.2.4_1/R.framework/Resources/include/Rinternals.h:440:18: note: expanded from macro 'CHAR'
#define CHAR(x) R_CHAR(x)
^~~~~~~~~
/Users/richiethomas/anaconda/include/libxml2/libxml/hash.h:171:22: note: passing argument to parameter 'name' here
const xmlChar *name);
^
2 warnings generated.
clang -I/usr/local/Cellar/r/3.2.4_1/R.framework/Resources/include -DNDEBUG -DLIBXML -I/Users/richiethomas/anaconda/include/libxml2 -DUSE_EXTERNAL_SUBSET=1 -DROOT_HAS_DTD_NODE=1 -DDUMP_WITH_ENCODING=1 -DUSE_XML_VERSION_H=1 -DXML_ELEMENT_ETYPE=1 -DXML_ATTRIBUTE_ATYPE=1 -DNO_XML_HASH_SCANNER_RETURN=1 -DLIBXML_NAMESPACE_HAS_CONTEXT=1 -DHAVE_R_CETYPE_T=1 -DHAVE_XML_WITH_ZLIB=1 -DHAVE_XML_HAS_FEATURE=1 -DUSE_R=1 -D_R_=1 -DHAVE_VALIDITY=1 -DXML_REF_COUNT_NODES=1 -I. -DLIBXML2=1 -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I/usr/local/include -fPIC -g -O2 -c xmlsecurity.c -o xmlsecurity.o
clang -I/usr/local/Cellar/r/3.2.4_1/R.framework/Resources/include -DNDEBUG -DLIBXML -I/Users/richiethomas/anaconda/include/libxml2 -DUSE_EXTERNAL_SUBSET=1 -DROOT_HAS_DTD_NODE=1 -DDUMP_WITH_ENCODING=1 -DUSE_XML_VERSION_H=1 -DXML_ELEMENT_ETYPE=1 -DXML_ATTRIBUTE_ATYPE=1 -DNO_XML_HASH_SCANNER_RETURN=1 -DLIBXML_NAMESPACE_HAS_CONTEXT=1 -DHAVE_R_CETYPE_T=1 -DHAVE_XML_WITH_ZLIB=1 -DHAVE_XML_HAS_FEATURE=1 -DUSE_R=1 -D_R_=1 -DHAVE_VALIDITY=1 -DXML_REF_COUNT_NODES=1 -I. -DLIBXML2=1 -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I/usr/local/include -fPIC -g -O2 -c xpath.c -o xpath.o
xpath.c:36:41: warning: passing 'const xmlChar *' (aka 'const unsigned char *') to parameter of type 'const char *' converts between pointers
to integer types with different sign [-Wpointer-sign]
SET_NAMES(ref, ScalarString(mkCharCE(el->name, encoding)));
^~~~~~~~
/usr/local/Cellar/r/3.2.4_1/R.framework/Resources/include/Rdefines.h:135:54: note: expanded from macro 'SET_NAMES'
#define SET_NAMES(x, n) setAttrib(x, R_NamesSymbol, n)
^
/usr/local/Cellar/r/3.2.4_1/R.framework/Resources/include/Rinternals.h:889:30: note: passing argument to parameter here
SEXP Rf_mkCharCE(const char *, cetype_t);
^
1 warning generated.
clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/Cellar/r/3.2.4_1/R.framework/Resources/lib -L/usr/local/opt/gettext/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/openssl/lib -L/usr/local/lib -o XML.so DocParse.o EventParse.o ExpatParse.o HTMLParse.o NodeGC.o RSDTD.o RUtils.o Rcatalog.o Utils.o XMLEventParse.o XMLHashTree.o XMLTree.o fixNS.o libxmlFeatures.o schema.o xmlsecurity.o xpath.o -L/Users/richiethomas/anaconda/lib -lxml2 -lz -liconv -lm -lz -lxml2 -F/usr/local/Cellar/r/3.2.4_1/R.framework/.. -framework R -lintl -Wl,-framework -Wl,CoreFoundation
installing to /usr/local/lib/R/3.2/site-library/XML/libs
** R
** inst
** preparing package for lazy loading
Creating a generic function for ‘source’ from package ‘base’ in package ‘XML’
in method for ‘xmlAttrsToDataFrame’ with signature ‘"AsIs"’: no definition for class “AsIs”
in method for ‘readKeyValueDB’ with signature ‘"AsIs"’: no definition for class “AsIs”
in method for ‘readSolrDoc’ with signature ‘"AsIs"’: no definition for class “AsIs”
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error : .onLoad failed in loadNamespace() for 'XML', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/usr/local/lib/R/3.2/site-library/XML/libs/XML.so':
dlopen(/usr/local/lib/R/3.2/site-library/XML/libs/XML.so, 6): Library not loaded: libxml2.2.dylib
Referenced from: /usr/local/lib/R/3.2/site-library/XML/libs/XML.so
Reason: image not found
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/usr/local/lib/R/3.2/site-library/XML’
The downloaded source packages are in
‘/private/var/folders/jy/0cwn40p951xc7f1480z3sxzm0000gn/T/RtmpEi0XEv/downloaded_packages’
Warning message:
In install.packages("XML") :
installation of package ‘XML’ had non-zero exit status
I solved this problem by using anaconda to install XML:
conda install -c r r-xml=3.98_1.5
Solution for Mac OS Catalina (i.e. in zsh).
I'm a novice, but this worked for me.
Make sure you have libxml2 installed in homebrew. (If you got it, brew list | grep libxml2 should confirm it; otherwise install it brew install libxml2. Don't have homebrew? Install it.)
Either create a zsh run com, touch ~/.zshrc, or find it in your home directory cd ~. (Use ls -a in Terminal to see if its in ~.)
Then make sure: export PATH="/usr/local/opt/libxml2/bin:$PATH" is in there (i.e. in ~/.zshrc). It shouldn't be in there yet! Add it using sudo nano ~/.zshrc. Then save it (ctrl + x, Y, enter). This should make sure the path to brew's libxml2 is the first thing that comes up when looking for libxml2. (FYI, I also added it to ~/.zprofile. I don't know which one is correct.)
Ok, now restart your terminal. Then run R in the Terminal using R. Once R has started, install.packages("XML"), pick a server to download it, and you should be good to go.
adding to #Travis's answer using conda install -c r r-xml=3.98_1.5 or conda install -c conda-forge r-xml works.
But make sure to run conda update r-essentials and reopen/restart the r terminal\notebook (whichever is your case).
You explained what is wrong and that helps.
XML package documentation in here: https://cran.r-project.org/web/packages/XML/index.html
Pay attetion to where it says You are trying to use a version 2.* edition of libxml
but an incompatible library.
What system are you using? I use OSX and when I had a similar issue I did run
brew install libxml2
and then it worked
I also see you use R 3.0+ and that should be very compatible.
Using MinGW32 on a Windows PC I am trying to compile pySpotify. The first error was that libspotify/api.h was missing. I fixed this by copying the appropriate folder from libspotify into C:\MinGW\include. However now dllwrap is now failing with ld linking. The binaries Spotify distribute are libspotify.dll and libspotify.lib. No matter where I put them (pySpotify folder/subfolders, temp build folder/subfolders and MinGW folder/subfolders) or what I name them (.a, .o & .so) it still shows the same error messages.
The pertinent error is:
C:\MinGW\bin\dllwrap.exe -mdll -static --output-lib build\temp.win32-2.7\Release\src\lib_spotify.a --def build\temp.win32-2.7\Release\src\_spotify.def -s build\temp.win32-2.7\Release\src\module.o build\temp.win32-2.7\Release\src\session.o build\temp.win32-2.7\Release\src\link.o build\temp.win32-2.7\Release\src\track.obuild\temp.win32-2.7\Release\src\album.o build\temp.win32-2.7\Release\src\albumbrowser.o build\temp.win32-2.7\Release\src\artist.o build\temp.win32-2.7\Release\src\artistbrowser.o build\temp.win32-2.7\Release\src\search.o build\temp.win32-2.7\Release\src\playlist.o build\temp.win32-2.7\Release\src\playlistcontainer.o build\temp.win32-2.7\Release\src\playlistfolder.o build\temp.win32-2.7\Release\src\image.o build\temp.win32-2.7\Release\src\user.o build\temp.win32-2.7\Release\src\pyspotify.o build\temp.win32-2.7\Release\src\toplistbrowser.o -LC:\Python26\libs -LC:\Python26\PCbuild -lspotify -lpython26 -lmsvcr90 -o build\lib.win32-2.7\spotify\_spotify.pyd
c:/mingw/bin/../lib/gcc/mingw32/4.7.2/../../../../mingw32/bin/ld.exe: cannot find -lspotify
collect2.exe: error: ld returned 1 exit status
dllwrap: gcc exited with status 1
error: command 'dllwrap' failed with exit status 1
bok says on github that:
You need to add the API headers in the include path (add something like -I~\libspotify\include to your compiler options) and the shared library in the library path (add -L~\libspotify\lib to your linker options). This will allow the compiler to find the necessary include files, and your linker to find the necessary binary objects.
However the distutils Extension class seems to be deprecated and hard to find documentation for (I believe this is where custom compiler options need to go). Appreciate that ~ may need changed to %USERPROFILE% or similar. Similarly %PYTHONPATH%\Lib\distutils\distutils.cfg has little documentation beyond the [build] compiler=mingw32 stanza. This makes editing the compile/link commands and their options impossible to change.
How do you compile pySpotify on Windows?
EDIT:
By using Python 2.6 and copying libspotify.dll/libspotify.lib to C:\Python26\PCbuild and renaming them to spotify.dll/libspotify.lib I now receive another error message from ld:
C:\MinGW\bin\dllwrap.exe -mdll -static --output-lib build\temp.win32-2.6\Release\src\lib_spotify.a --def build\temp.win32-2.6\Release\src\_spotify.def -s build\temp.win32-2.6\Release\src\module.o build\temp.win32-2.6\Release\src\session.o build\temp.win32-2.6\Release\src\link.o build\temp.win32-2.6\Release\src\track.obuild\temp.win32-2.6\Release\src\album.o build\temp.win32-2.6\Release\src\albumbrowser.o build\temp.win32-2.6\Release\src\artist.o build\temp.win32-2.6\Release\src\artistbrowser.o build\temp.win32-2.6\Release\src\search.o build\temp.win32-2.6\Release\src\playlist.o build\temp.win32-2.6\Release\src\playlistcontainer.o build\temp.win32-2.6\Release\src\playlistfolder.o build\temp.win32-2.6\Release\src\image.o build\temp.win32-2.6\Release\src\user.o build\temp.win32-2.6\Release\src\pyspotify.o build\temp.win32-2.6\Release\src\toplistbrowser.o -LC:\Python26\libs -LC:\Python26\PCbuild -lspotify -lpython26 -lmsvcr90 -o build\lib.win32-2.6\spotify\_spotify.pyd
_spotify.exp: file not recognized: File format not recognized
collect2.exe: error: ld returned 1 exit status
dllwrap: gcc exited with status 1
error: command 'dllwrap' failed with exit status 1
Not having access to a mingw installation at the moment, I can suggest a few things.
First, ld is known to be picky about order of arguments. Strangely, when I googled for "ld argument order", I got a bunch of pages suggesting that the order doesn't matter, but I have been burned several times by this. I've had the most success with the following argument order:
Switches to ld (ie, -Wall)
Library search paths (ie, -LPATH)
Object files
Libraries (ie, -lspotify)
I noticed in your linker output some references to amd64. I'm not sure how you compiled the other object files that you have, but since libspotify is 32-bit on Windows, I'm guessing that mixing 32/64 bit here is not going to work out too well.
The last thing I can think of is that perhaps the dll extension is confusing to ld, have you tried changing the filename to libspotify.so? I know this is kind of a shot in the dark, but otherwise I'm not sure how to help you further.
I guess you are trying to link a 64bit version of pyspotify against a 32bit version of libspotify. Try to rebuild pyspotify adding the -m32 to CFLAGS and CXXFLAGS
I've added some instructions on how I got it to compile on the actual ticket for the issue. Let me Know if it helped you!
https://github.com/mopidy/pyspotify/issues/63
I'm trying to compile the msgpack-python python module with gcc (v4.7) on solaris 10. The python installed is 2.6.8. Distutils is automatically picking up a incorrect compiler option (-xcode=pic32) that I want to remove from command.
The full command that distutils is putting together is:
/opt/csw/bin/gcc-4.7 -DNDEBUG -O -O2 -pipe -mcpu=v9 -I/opt/csw/include -xcode=pic32 -I/opt/csw/include/python2.6 -c msgpack/_msgpack.c -o build/temp.solaris-2.10-sun4v-2.6/msgpack/_msgpack.o
but produces this error:
gcc-4.7: error: language code=pic32 not recognized
then fails. If I remove that -xcode=pic32 option and manually execute the above command the module compiles successfully.
I need to be able to do this in an automated fashion though (using a buildfarm to produce the packages). The question is, Without modifying or changing the current python or distutils, is there a way to "remove" this option that distutils is picking up, so I can have the python setup.py process build the module appropriately (i.e. without the pic32 option)?
Thanks
Do not compile with that gcc. -xcode=pic32 is Sun Studio complier command line parameter. It will lead to linking problems too, even if you compile OK. Compile with SUN CoolTools gcc which can understand such parameter, or use Oracle Solaris Studio for SPARC.
Some hints:
GCC produce very slow code for SPARC, that's for why SUN created Cool Tools.
You haven't to remove -xcode=pic32, but change for -m32 -fpic, when you insist on gcc-4.7
To get mature setup of OSS tool I'm using pkgsrc compiling with Studio Express to particular CPU (-xtarget=native)
You may also find luck by setting the follow env vars:
export CC=$gcc_dir_path # Example: /usr/bin/gcc
export CXX=$gxx_dir_path # Example: /usr/bin/g++
export CFLAGS=''
export CPPFLAGS=''
export CXXFLAGS=''
export LDFLAGS=''
Note: There is a difference between unset env var, and set-as-empty env var. I had build bugs with Python packages when my *FLAGS env vars were unset. (Calling gcc with option -xO2 was the cause.) Setting as empty did the trick.