pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Compilation of security/polkit fails



On Fri, 10 Apr 2020 at 12:37:12 +0000, Elouan Fabre wrote:
> Hi all,
> I have a PowerMac G4 (PowerPC processor, macppc platform) which runs
> NetBSD 9.0, but for some reason, I cannot compile polkit:
> # pwd
> /usr/pkgsrc/security/polkit
> # make
> After a while, it ends up with the following errors:
> ld: warning: libatomic.so.1, needed by
> /usr/pkgsrc/security/polkit/work/.buildlink/lib/libmozjs-52.so, not
> found (try using -rpath or -rpath-link)
> ld: warning: libstdc++.so.7, needed by
> /usr/pkgsrc/security/polkit/work/.buildlink/lib/libmozjs-52.so, not
> found (try using -rpath or -rpath-link)
> ld: /usr/pkgsrc/security/polkit/work/.buildlink/lib/libmozjs-52.so:
> undefined reference to `__atomic_fetch_add_8@LIBATOMIC_1.0'
> gmake[4]: *** [Makefile:651: polkitd] Error 1
> It seems to me it is a bug, is it?
> Full log: http://paste.iiens.net/Wt48DcQf

The short answer is you've encountered a limitation of your hardware
platform versus the expectations of some of the software you're
building. spidermonkey52 expects certain atomic operations which aren't
possible do to with a G4. GCC offers a library that provides a software
implementation of those atomics, but it's not included in NetBSD base.

Now, as for the exact state of the packaging issue you've encountered,
I probably bear the blame for that. I tried to work around the
limitation of spidermonkey52 on macppc by requiring a GCC from pkgsrc
(which does include libatomic). At the time (around a year ago) that
was the only thing stopping Xfce4 from packaging and running for me on
macppc. (I haven't had occasion to try that recently.)

Here it seems you have spidermonkey52 installed, but the linker can't
locate the corresponding gcc or gcc-libs package associated with its
build that would include the missing libraries it's linked against.
Did you build spidermonkey52 from source? (I'm guessing yes, and that
the path to the extra GCC libraries isn't included in what's supplied
to polkit for linking.)

(Also, if you're building a bunch of packages yourself, and they have
cascading dependencies on libatomic -- or probably C++ libraries -- you
may want to define a pkgsrc GCC compiler to build *all* packages for
consistency, which you can do in your mk.conf definition. Feel free to
ask me for more details here. I do have a G4 Mac as well, and can help
look into this, though my time is a little limited right now.)

BTW, the link you posted didn't seem to contain the log. It gave me an
error ("Paste non trouvé.").

Regards,

Dave




Home | Main Index | Thread Index | Old Index