Compilation issue ( cc1: error: unrecognized command line option "-ip" ) - python

I'm having trouble while compiling certain python modules. The setup fails with the following error:
cc1: error: unrecognized command line option "-ip"
error: Setup script exited with error: command 'gcc' failed with exit status 1
I am on a shared system and do not have root access. So, I install the modules using:
easy_install --prefix=$HOME/local <module_dir>
I looked this up on google and SO but have found no concrete solution yet. From what I understand, it has to do something with the compiler settings/configuration.
I would really appreciate if you could guide me through the steps required to resolve this. I have encountered the same issue with several python modules(pygame, crypto, etc) while most others installed without any hiccups.
Thank You!

Related

cmd error from python install script?

I'm installing a py script and when installing im getting this error :
"build\temp.win32-2.7\Release\url/url-cpp/src\url.pyd.manifest : general error c1010070: Failed to load and parse the manifest. The system cannot find the file specified.
error: Setup script exited with error: command 'mt.exe' failed with exit status 31"
Can anyone tell me how to fix this?
I have tried the ld_args.append('/MANIFEST') adding to dir>\Lib\distutils\msvc9compiler.py.
Did not work for me. Is there anything else I can do?

Python PyObjC_IdToPython(#protocol(NSURLSessionStreamDelegate)) error

when i try to install pyobjc-framework-Cocoa i see this error:
In file included from Modules/_Foundation.m:15:
Modules/_Foundation_protocols.m:14:28: error: cannot find protocol declaration for 'NSProgressReporting'
p = PyObjC_IdToPython(#protocol(NSProgressReporting)); Py_XDECREF(p);
^
Modules/_Foundation_protocols.m:15:28: error: cannot find protocol declaration for 'NSURLSessionStreamDelegate'
p = PyObjC_IdToPython(#protocol(NSURLSessionStreamDelegate)); Py_XDECREF(p);
^
2 errors generated.
error: command '/usr/bin/clang' failed with exit status 1
I was able to avoid the problem in the following environment:
Mac OS X 10.10.5
pip8.1.2
python3.4
Please try the following command.
pip uninstall pyobjc-core
pip install pyobjc==3.0.4
The cause of the problem seems to be a delivery mistake of "pyobjc-core3.1.1".
It should go well if unified in 3.0.4.
cheers!

Using Unison "-repeat watch" in FreeBSD (10.2) after installing from ports yields error

After installing unison from /usr/ports/net/unison with X11 disabled via make config, running the command unison -repeat watch /dir/mirror/1 /dir/mirror/2
Yields the message:
Fatal error: No file monitoring helper program found
From here I decided to try using pkg to install unison-nox11 and this yields the same error message.
I've also tried copying the fsmonitor.py file from unison-2.48.3.tar.gz to /usr/bin/unison-fsmonitor and I got the following error:
Fatal error: Unexpected response 'Usage: unison-fsmonitor [options] root [path] [path]...' from the filesystem watcher (expected VERSION)
Running the command unison-fsmonitor version shows the message
unsupported platform freebsd10
Anyone have any ideas on how to fix this?
I think the message is pretty clear: unison-fsmonitor can't be run on freebsd10 because it's not supported, so you can't use Unison with the -repeat option.
Since it's just written in Python, though, I don't see why it shouldn't be supported. Maybe message the developer.

Installing PDQ on windows

I am trying to install "pretty damn quick", an analysis tool for Layered Queing networks.
However there seems to be a lot wrong with my system, and switching to Linux is not an option.
Here is what i tried to get the PDQ running:
First try: Python
I installed python2.7 and downloaded the PDQ for python distribution (its in the tarball in the python dir) :
C:\pdq\pdq42\python>python setup.py install
running install
running build
running build_ext
building 'pdq' extension
error: Unable to find vcvarsall.bat
This error stems from the fact that i supposedly dont have a C-compiler. Even though typing g++ gives me:
C:\pdq\pdq42\python>g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=c:/rtools/gcc-4.6.3/bin/../libexec/gcc/i686-w64-mingw3
3/lto-wrapper.exe
Target: i686-w64-mingw32
...snipped...
This problem is somehow documented? So i tried going over to Perl. It said there that the compiler comes with Strawberry Perl. So I installed that. Dmake gave me a lot of trouble but in the end I managed to install it.
C:\pdq\pdq42\perl5>perl Makefile.PL
Writing Makefile for pdq
C:\pdq\pdq42\perl5>dmake
Skip blib\lib\pdq.pm (unchanged)
...snipped...
g++.exe: error: MVA_Approx.o: No such file or directory
g++.exe: error: MVA_Canon.o: No such file or directory
g++.exe: error: MVA_Solve.o: No such file or directory
g++.exe: error: PDQ_Build.o: No such file or directory
g++.exe: error: PDQ_Exact.o: No such file or directory
g++.exe: error: PDQ_Globals.o: No such file or directory
g++.exe: error: PDQ_Report.o: No such file or directory
g++.exe: error: PDQ_Utils.o: No such file or directory
dmake: Error code 129, while making 'blib\arch\auto\pdq\pdq.dll'
Gives me new errors, that i cannot fix, since i cannot google them.
As the last resort i try out installing R, since this should work according to the documentation.
install.packages("c:\pdq\pdq_6.0-1.tar.gz",repos=NULL,type="source")
Warning: invalid package 'c:/pdq/pdq_6.0-1.tar.gz'
Error: ERROR: no packages specified
Warning messages:
1: running command '"C:/Programme/R/R-3.0.1/bin/i386/R" CMD INSTALL -l "C:\Programme\R\R-3.0.1\library" "c:/pdq/pdq_6.0-1.tar.gz"' had status 1
2: In install.packages("c:\pdq\pdq_6.0-1.tar.gz", repos = NULL, type = "source") :
installation of package ‘c:/pdq/pdq_6.0-1.tar.gz’ had non-zero exit status
However in this case i don't even know where to start debugging this to get it going.
So I am seeking help from SO. My question is:
Where did I go wrong and what can I do to find additional information leading to identify the problem? I would really like to have PDQ installed.

Problem installing Shoutpy + Boost.python on opensolaris

Im trying to install shoutpy on opensolaris 2009.6. It relies on boost.python. i've installed the boost_devel libraries from blastwave and linked /opt/csw/include/boost to /usr/include/boost . But when I try to easy_install shoutpy I get the following output
munderwo#opensolaris-test1:/usr/include$ pfexec easy_install shoutpy
Searching for shoutpy
Reading http://pypi.python.org/simple/shoutpy/
Reading http://dingoskidneys.com/shoutpy/
Best match: shoutpy 1.0.0
Downloading http://dingoskidneys.com/shoutpy/shoutpy-1.0.0.tar.gz
Processing shoutpy-1.0.0.tar.gz
Running shoutpy-1.0.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-w7XQfv/shoutpy-1.0.0/egg-dist-tmp-k11Dky
In file included from /usr/include/boost/python/object/make_instance.hpp:9,
from /usr/include/boost/python/object/make_ptr_instance.hpp:8,
from /usr/include/boost/python/to_python_indirect.hpp:11,
from /usr/include/boost/python/converter/arg_to_python.hpp:10,
from /usr/include/boost/python/call.hpp:15,
from /usr/include/boost/python/object_core.hpp:12,
from /usr/include/boost/python/args.hpp:25,
from /usr/include/boost/python.hpp:11,
from shoutpy.cc:26:
/usr/include/boost/python/object/instance.hpp:44: error: a casts to a type other than an integral or enumeration type cannot appear in a constant-expression
/usr/include/boost/python/object/instance.hpp:44: error: '->' cannot appear in a constant-expression
/usr/include/boost/python/object/instance.hpp:44: error: `&' cannot appear in a constant-expression
In file included from /usr/include/boost/python/converter/registry.hpp:9,
from /usr/include/boost/python/converter/registered.hpp:8,
from /usr/include/boost/python/object/make_instance.hpp:10,
from /usr/include/boost/python/object/make_ptr_instance.hpp:8,
from /usr/include/boost/python/to_python_indirect.hpp:11,
from /usr/include/boost/python/converter/arg_to_python.hpp:10,
from /usr/include/boost/python/call.hpp:15,
from /usr/include/boost/python/object_core.hpp:12,
from /usr/include/boost/python/args.hpp:25,
from /usr/include/boost/python.hpp:11,
from shoutpy.cc:26:
/usr/include/boost/python/converter/rvalue_from_python_data.hpp:99: error: '->' cannot appear in a constant-expression
/usr/include/boost/python/converter/rvalue_from_python_data.hpp:99: error: `&' cannot appear in a constant-expression
/usr/include/boost/python/converter/rvalue_from_python_data.hpp:99: error: template argument 1 is invalid
/usr/include/boost/python/converter/rvalue_from_python_data.hpp:99: error: `value' is not a member of `<declaration error>'
error: Setup script exited with error: command '/usr/lib/python2.6/pycc' failed with exit status 1
This is using python2.6, opensolaris 2009.06, boost 1.35.
any help would be great!
Cheers
Mark
Edit - this has been cross posted on serverfault as its a bit hard to classify where the problem domain is. https://serverfault.com/questions/88724/problem-with-opensolaris-boost-python-and-shoutpy
Unfortunately I've never tried to compile shoutpy under OpenSolaris and I don't use it these days. Boost.python requires a lot from its C++ compiler. Use easy_install -b build_directory shoutpy so it'll keep the source code after it fails, then check the C++ compiler Python tries to use against those supported by boost.python.
I tried compiling it on my desktop Linux and it still works after I edit setup.py to link against libboost_python-mt instead of libboost_python which doesn't exist in Ubuntu (there are several libboost_python* depending on Python version and so forth).

Categories

Resources