Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Oct 2012 02:36:38 -0500
From:      =?ISO-8859-1?Q?Alonso_C=E1rdenas_M=E1rquez?= <acm@FreeBSD.org>
To:        Ruslan Mahmatkhanov <cvs-src@yandex.ru>
Cc:        FreeBSD Ports Mailing List <ports@freebsd.org>
Subject:   Re: Difference in databases/firebird25-client built as root and as unprivileged user
Message-ID:  <CAEpPhTKhh=WKe18oOyczJRZTWMn0o_0rc7bwcTxsdsR9n5iNdQ@mail.gmail.com>
In-Reply-To: <5073152F.5060301@yandex.ru>
References:  <5073152F.5060301@yandex.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
2012/10/8 Ruslan Mahmatkhanov <cvs-src@yandex.ru>:
> Hello,

Hi Ruslan

> there is a native python binding for Firebird database:
> http://people.freebsd.org/~rm/fdb-0.9.1.tgz
>
> It is based on ports/172455 by Jose Jachuf. It builds just fine in tinderbox
> both with python2 and python3 but fails to build on a live system. The
> difference is that firebird25-client's (actually -server, because this is a
> slave port) Makefile has this lines in it:
>
> .ifndef PACKAGE_BUILDING
>        @if [ `${ID} -u` -eq 0 ]; then \
>        ${ECHO_MSG} "==> Please do not build ${PORTNAME} as 'root' because
> this may cause conflicts with SysV semaphores of running services."; exit 1;
> fi
> .endif
>
> So, while being built in tinderbox this happens under root user, but with
> manual building from ports, it requires to build it as unprivileged user. In
> later case I've got this when trying to build the aforementioned python
> binding (py-fdb):
>
> """
> ===>  Configuring for py27-fdb-0.9.1
> Traceback (most recent call last):
>   File "setup.py", line 7, in <module>
>     from fdb import __version__
>   File
> "/usr/local/tinderbox/portstrees/FreeBSD/ports/databases/py-fdb/work/fdb-0.9.1/fdb/__init__.py",
> line 23, in <module>
>     from fdb.fbcore import *
>   File
> "/usr/local/tinderbox/portstrees/FreeBSD/ports/databases/py-fdb/work/fdb-0.9.1/fdb/fbcore.py",
> line 26, in <module>
>     from . import ibase
>   File
> "/usr/local/tinderbox/portstrees/FreeBSD/ports/databases/py-fdb/work/fdb-0.9.1/fdb/ibase.py",
> line 41, in <module>
>     fb_library = CDLL(fb_library_name)
>   File "/usr/local/lib/python2.7/ctypes/__init__.py", line 365, in __init__
>     self._handle = _dlopen(self._name, mode)
> OSError: /usr/local/lib/libfbclient.so.2: Undefined symbol
> "_ZTISt9bad_alloc"
> *** [do-configure] Error code 1
> """
>
> If I rebuild firebird25-client with those three lines commented out (with
> root privs), then this py-fdb port builds just fine. The question is - what
> the difference in privileged/unprivileged build may be, and what's proper
> way to fix this? Thanks.

you could add a pre-everything line into py-fdb Makefile file with
some message about firebird2*-client ports problem. It could be the
following

######

databases/py-fdb depends of databases/firebird25-client

If you have not running services using SysV semaphores, you could
build  databases/firebird25-client using the following:

cd /usr/ports/databases/firebird25-client && make PACKAGE_BUILDING=yes
install clean clean-depends

Otherwise, please install databases/firebird25-client binary package

######

> --
> Regards,
> Ruslan
>
> Tinderboxing kills... the drives.

Sorry for delay, you know real life sometimes is hard :)

Greetings
ACM



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAEpPhTKhh=WKe18oOyczJRZTWMn0o_0rc7bwcTxsdsR9n5iNdQ>