[MacPorts] #33673: libpqxx: tests don't work
#33673: libpqxx: tests don't work -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: dweber@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Keywords: | Port: libpqxx -------------------------------------+-------------------------------------- "sudo port test libpqxx" doesn't work. It says: {{{ DEBUG: Executing proc-pre-org.macports.test-test-0 sh: initdb: command not found shell command "initdb -D libpqxx-4.0/test_libpqxx" returned error 127 }}} This is not surprising since "initdb" is a command provided by the postgresql ports, and they're never installed anywhere in $PATH. The fix is to call these programs by their correct absolute paths; the attached patch (which should be applied after updating the port to 4.0 using the patches in #33671) fixes this, but then we run into this next error: {{{ DEBUG: Executing proc-pre-org.macports.test-test-0 The files belonging to this database system will be owned by user "macports". This user must also own the server process. The database cluster will be initialized with locale en_US.UTF-8. The default database encoding has accordingly been set to UTF8. The default text search configuration will be set to "english". creating directory libpqxx-4.0/test_libpqxx ... initdb: could not create directory "libpqxx-4.0": Permission denied shell command "/opt/local/lib/postgresql91/bin/initdb -D libpqxx-4.0/test_libpqxx" returned error 1 }}} I don't know postgresql or libpqxx so I'm not sure what needs to be done to fix this. -- Ticket URL: <https://trac.macports.org/ticket/33673> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33673: libpqxx: tests don't work -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: dweber@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Keywords: | Port: libpqxx -------------------------------------+-------------------------------------- Comment(by ryandesign@…): Looking at this further, I see the tests probably never worked since the portfile says "test.run no". I think the portfile was making assumptions about the current working directory. Fixing that and a few other details gets us much further, to the postgresql server actually starting and the tests being run. But they all fail with: {{{ Exception: FATAL: database "test_libpqxx" does not exist }}} I haven't read the documentation so I don't know what's expected to happen, but what I observe to happen is: 1. "initdb" creates a directory in which postgresql can store databases, and creates the minimal system databases required 2. "pg_ctl start" starts postgresql pointed at that directory for storage 3. "make" check runs tests against a particular database which it expects to already exist So it seems like we need a step up there between 2 and 3 to actually create that database. -- Ticket URL: <https://trac.macports.org/ticket/33673#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33673: libpqxx: tests don't work -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: dweber@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Keywords: haspatch | Port: libpqxx -------------------------------------+-------------------------------------- Changes (by ryandesign@…): * keywords: => haspatch Comment: Yes, running createdb to create the database first is looking very promising. But it fails later with: {{{ ld: duplicate symbol __ZTIN12_GLOBAL__N_116deliberate_errorE$non_lazy_pointer in .libs/runner and .libs/runner collect2: ld returned 1 exit status }}} This is [http://gborg.postgresql.org/pipermail/libpqxx- general/2012-March/000637.html discussed on their mailing list] and is apparently a compiler bug, which is super since I doubt Apple will release any new versions of gcc for us. Someone could test whether we're ok using llvm-gcc-4.2 or clang, and if so, maybe we don't care about gcc anymore either. I've also enabled running the tests in parallel, since the README specifically mentions doing that. -- Ticket URL: <https://trac.macports.org/ticket/33673#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33673: libpqxx: tests don't work -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: dweber@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Keywords: haspatch | Port: libpqxx -------------------------------------+-------------------------------------- Comment(by ryandesign@…): Replying to [comment:2 ryandesign@…]:
{{{ ld: duplicate symbol __ZTIN12_GLOBAL__N_116deliberate_errorE$non_lazy_pointer in .libs/runner and .libs/runner }}} I get the same problem building libpqxx with the compiler from the clang-3.0 port. -- Ticket URL: <https://trac.macports.org/ticket/33673#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33673: libpqxx: tests don't work -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: dweber@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Keywords: haspatch | Port: libpqxx -------------------------------------+-------------------------------------- Comment(by ryandesign@…): Committed in r91295, though as I say the tests don't complete for me. If the tests do run successfully for anybody else, or if you know what to do to fix it, please let us know here. -- Ticket URL: <https://trac.macports.org/ticket/33673#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#33673: libpqxx: tests don't work ---------------------------+-------------------------------- Reporter: ryandesign@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Resolution: | Keywords: haspatch Port: libpqxx | ---------------------------+-------------------------------- Changes (by mf2k@…): * owner: dweber@… => macports-tickets@… Comment: dweber has retired. See #43834. -- Ticket URL: <https://trac.macports.org/ticket/33673#comment:5> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts