Opened 9 years ago
Closed 9 years ago
#50185 closed defect (fixed)
gringo 4.5.4 fails to compile w/ Python3
Reported by: | tim@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.3.4 |
Keywords: | Cc: | tim@…, kurthindenburg (Kurt Hindenburg), dliessi (Davide Liessi) | |
Port: | gringo |
Description
With OS X 10.11.2 and Xcode 7.2, gringo fails to compile.
-/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_gringo/gringo/main.log :info:build libgringo/gringo/bug.hh:41:15: note: candidate function :info:build inline string to_string(int x) { :info:build ^ :info:build libgringo/gringo/bug.hh:47:15: note: candidate function :info:build inline string to_string(unsigned x) { :info:build ^ :info:build libgringo/gringo/bug.hh:53:15: note: candidate function :info:build inline string to_string(long x) { :info:build ^ :info:build libgringo/gringo/bug.hh:65:15: note: candidate function :info:build inline string to_string(long long x) { :info:build ^ :info:build libgringo/gringo/bug.hh:71:15: note: candidate function :info:build inline string to_string(unsigned long long x) { :info:build ^ :info:build 2 errors generated. :info:build scons: *** [build/release/libgringo/src/term.o] Error 1 :info:build scons: building terminated because of errors. :info:build Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_gringo/gringo/work/gringo-4.5.4-source" && /opt/local/bin/scons gringo clingo reify --build-dir=release CXX="/usr/bin/clang++ -arch x86_64" :info:build Exit code: 2
Attachments (4)
Change History (16)
Changed 9 years ago by tim@…
comment:3 Changed 9 years ago by kurthindenburg (Kurt Hindenburg)
Summary: | gringo 4.5.4 fails to compile → gringo 4.5.4 fails to compile w/ Python3 |
---|
On your system, it is grabbing python3, while mine that works is python2
-I/opt/local/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m {{{ -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 }}}
comment:5 follow-up: 7 Changed 9 years ago by dliessi (Davide Liessi)
Please post the result of sudo -u macports which -a python-config
and port select python
.
comment:6 Changed 9 years ago by dliessi (Davide Liessi)
I suspect SCons is picking up the wrong Python because it runs python-config
, which can be the link created by port select
.
If this is the case, there are two simple fixes:
- declare Python 2.7 as dependency and force SCons to use it, or
- force SCons to use the system-provided Python regardless of what is installed by MacPorts.
I would prefer the first possibility, having in mind that in the near future I want to enable the installation of the Python module, which is tested upstream only with Python 2.7 (and probably does not work with Python 3, which would explain the errors in this ticket).
I can provide a patch as soon as we choose the solution.
comment:7 Changed 9 years ago by tim@…
Replying to davide.liessi@…:
Please post the result of
sudo -u macports which -a python-config
andport select python
.
Turing:~ tim$ port select python Available versions for python:
none python26-apple python27 (active) python27-apple python35
(It works with python27 is active. When python35 is active, it fails).
$ sudo -u macports which -a python-config /opt/local/bin/python-config /opt/local/bin/python-config /usr/bin/python-config
comment:8 Changed 9 years ago by dliessi (Davide Liessi)
This confirms my suspicion.
I'll soon provide a patch for the first fix I proposed.
comment:9 Changed 9 years ago by dliessi (Davide Liessi)
I changed my mind again and decided to completely disable Python (patching SConstruct), because there is no way to tell the build system not to use the optional dependencies if they are found.
I'll get back to this when enabling the installation of the Python and Lua modules.
Changed 9 years ago by dliessi (Davide Liessi)
Attachment: | Portfile-gringo.diff added |
---|
Changed 9 years ago by dliessi (Davide Liessi)
Attachment: | patch-SConstruct.diff added |
---|
Changed 9 years ago by dliessi (Davide Liessi)
Attachment: | Portfile-gringo.2.diff added |
---|
increase revision: installed files have changed
comment:11 Changed 9 years ago by dliessi (Davide Liessi)
Please forget Portfile-gringo.diff
and use Portfile-gringo.2.diff
instead: in the first diff I forgot to increase the revision, which is necessary, since the installed files have changed.
comment:12 Changed 9 years ago by kurthindenburg (Kurt Hindenburg)
Resolution: | → fixed |
---|---|
Status: | new → closed |
build log