[PATCHES] Generate shorter name for extra python files
Timur I. Bakeyev
timur at freebsd.org
Sat Apr 28 22:05:12 UTC 2018
Just a short update - I've tested your patch on FreeBSD, it doesn't work
OOTB. One issue is that `pyext_PATTERN` on FreeBSD is set simply to `%s.so`
for all Python versions, so the trick we use to to build EXTRA_PYTHON
version doesn't work - binaries for 3.x just simply override 2.x ones. I've
addressed that by explicitly setting:
in the EXTRA_PYTHON branch of the buildtools/wafsamba/samba_python.py. That
does work with the old patch and, kind of works with the new one, except
that `make test` is unable to load PY extension for 3.x. I'm still
investigating what is different with regard to the old patch, which was
working fine in that case. Lost development VM doesn't help to speed up
this process though :)
With best regards,
On 17 April 2018 at 09:42, Lukas Slebodnik <lslebodn at redhat.com> wrote:
> On (23/09/17 10:15), Andrew Bartlett via samba-technical wrote:
> >On Fri, 2017-09-22 at 22:49 +0200, Lukas Slebodnik wrote:
> >> But as i showed you in previous example it is not a problem that
> >> symbol is in version script because it is not part of util library
> >> for python3. Version script is used as a whitelist to allow symbols from
> >> objects *.o appear in library. But if symbol is missing in object files
> >> it will not be part of library even though it is in version script.
> >> https://www.akkadia.org/drepper/dsohowto.pdf
> >> Section 2.2 says:
> >> The concept of export maps is to tell the linker explicitly
> >> which symbols to export from the generated object.
> >> And it is much simpler to use version script(export maps)
> >> then __attribute__ ((visibility ("hidden")))
> >> But if you prefer to have separate version script(ABI/*) for python2
> >> and python3 I do not have a problem with that. I can just see a small
> >> benefit in de-duplication.
> >The ABI files are not just for the version scripts. They are also used
> >to determine if a symbol is removed or the signature changed, and
> >triggers logic to reject such a build.
> >If there is just one ABI file for both, then if python2 requires a
> >different ABI to python3, then either on the other will fail a build.
> >However, we don't want ABI files for each possible python3 version (35m
> >etc), just for python3 overall, hence the .py3 thing.
> >I hope this helps clarify things.
> I would like to apologize that it took ages to send updated version of
> patches. Hopefully, it would work for everyone.
> Adding Timur to CC for checking it for FreeBSD
> And now with patch. :-) I had a suspicion that sending patches after
> is not the best idea.
More information about the samba-technical