From owner-freebsd-ports-bugs@FreeBSD.ORG Tue May 5 20:14:33 2015 Return-Path: Delivered-To: freebsd-ports-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C58DBCA9 for ; Tue, 5 May 2015 20:14:33 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF4551520 for ; Tue, 5 May 2015 20:14:33 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id t45KEX7G088138 for ; Tue, 5 May 2015 20:14:33 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 199929] [NEW PORT] math/cryptominisat Date: Tue, 05 May 2015 20:14:33 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: jbeich@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-ports-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 May 2015 20:14:33 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199929 --- Comment #4 from Jan Beich --- Created attachment 156406 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=156406&action=edit PYTHON as separate ports, v0 (In reply to 6yearold from comment #3) > (In reply to Jan Beich from comment #1) >>WARN: /usr/ports/math/cryptominisat/pkg-plist: [8]: installing shared >>libraries, please define USE_LDCONFIG as appropriate >>Maybe set SOVERSION, so the library path can be cached by ldconfig(8) >>and used not only via RPATH. > Yup, but what's the proper way to do this? Make a symlink at post-install? After testing it works fine with just USE_LDCONFIG. Broken ldconfig -r output can be ignored as it doesn't affect LIB_DEPENDS implementation for a few years. If you still want SOVERSION try: set_target_properties(libcryptominisat4 PROPERTIES ... SOVERSION 0 ) >>USES=python with no version specified is for ports that support both >>python2 and python3. CMakeLists.txt seems to disagree: > > As with find_package(Boost 1.46) case, this version number is a minimum version > required. Since cryptominisat author doesn't check for actual version of python > that have been found, i thought it should work with any python that is 2.7+. Try building with: # in make.conf DEFAULT_VERSIONS = python=3.4 which would either not find suitable python version or fail as pycryptosat.cpp:68:10: error: use of undeclared identifier 'PyInt_Check' if (!IS_INT(lit)) { ^ pycryptosat.cpp:21:21: note: expanded from macro 'IS_INT' #define IS_INT(x) (PyInt_Check(x) || PyLong_Check(x)) ^ pycryptosat.cpp:366:11: error: no member named 'ob_type' in 'Solver' self->ob_type->tp_free((PyObject*)self); ~~~~ ^ pycryptosat.cpp:409:5: error: cannot initialize a member subobject of type 'Py_ssize_t' (aka 'long') with an lvalue of type 'const char [19]' "pycryptosat.Solver", /*tp_name*/ ^~~~~~~~~~~~~~~~~~~~ pycryptosat.cpp:412:5: error: cannot initialize a member subobject of type 'printfunc' (aka 'int (*)(PyObject *, FILE *, int)') with an rvalue of type 'destructor' (aka 'void (*)(PyObject *)'): different number of parameters (3 vs 1) (destructor)Solver_dealloc, /*tp_dealloc*/ ^~~~~~~~~~~~~~~~~~~~~~~~~~ pycryptosat.cpp:427:5: error: cannot initialize a member subobject of type 'const char *' with an rvalue of type 'unsigned long' Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/local/include/python3.4/object.h:647:29: note: expanded from macro 'Py_TPFLAGS_DEFAULT' #define Py_TPFLAGS_DEFAULT ( \ ^ pycryptosat.cpp:428:5: error: cannot initialize a member subobject of type 'traverseproc' (aka 'int (*)(PyObject *, visitproc, void *)') with an lvalue of type 'const char [15]' "Solver objects", /* tp_doc */ ^~~~~~~~~~~~~~~~ pycryptosat.cpp:435:5: error: cannot initialize a member subobject of type 'struct PyMemberDef *' with an lvalue of type 'PyMethodDef [4]' Solver_methods, /* tp_methods */ ^~~~~~~~~~~~~~ pycryptosat.cpp:436:5: error: cannot initialize a member subobject of type 'struct PyGetSetDef *' with an lvalue of type 'PyMemberDef [1]' Solver_members, /* tp_members */ ^~~~~~~~~~~~~~ pycryptosat.cpp:443:5: error: cannot initialize a member subobject of type 'allocfunc' (aka 'PyObject *(*)(struct _typeobject *, Py_ssize_t)') with an rvalue of type 'initproc' (aka 'int (*)(PyObject *, PyObject *, PyObject *)'): different number of parameters (2 vs 3) (initproc)Solver_init, /* tp_init */ ^~~~~~~~~~~~~~~~~~~~~ pycryptosat.cpp:445:5: error: cannot initialize a member subobject of type 'freefunc' (aka 'void (*)(void *)') with an lvalue of type 'PyObject *(PyTypeObject *, PyObject *, PyObject *)': different number of parameters (1 vs 3) Solver_new, /* tp_new */ ^~~~~~~~~~ pycryptosat.cpp:458:9: error: non-void function 'initpycryptosat' should return a value [-Wreturn-type] return; ^ pycryptosat.cpp:460:9: error: use of undeclared identifier 'Py_InitModule3' m = Py_InitModule3("pycryptosat", module_methods, ^ Also, USES+=python:build doesn't account for libpython dependency. $ readelf -d .../pycryptosat.so | fgrep NEEDED 0x0000000000000001 (NEEDED) Shared library: [libcryptominisat4.so] 0x0000000000000001 (NEEDED) Shared library: [libpython2.7.so.1] 0x0000000000000001 (NEEDED) Shared library: [libc++.so.1] 0x0000000000000001 (NEEDED) Shared library: [libcxxrt.so.1] 0x0000000000000001 (NEEDED) Shared library: [libm.so.5] 0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1] 0x0000000000000001 (NEEDED) Shared library: [libc.so.7] >> Why not create a separate USE_PYTHON=distutils port that depends on this one? > I don't see why it's required. The setup.py script is still configured by > CMake, so, from my understanding, i would have to run either cmake or setup.py > manually. It was merely a suggestion (not requirement) to: - let the ports framework set the build environment for you - provide python bindings for package users I'm attaching an example with all of the mentioned issues addressed. Hopefully, slave deduplication doesn't make the approach hard to understand. -- You are receiving this mail because: You are the assignee for the bug.