tech-pkg archive

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

Re: pkg-config difference when run in pkgsrc vs normal run?





пт, 5 июл. 2024 г., 20:51 Greg Troxel <gdt%lexort.com@localhost>:
Andrew Randrianasulu <randrianasulu%gmail.com@localhost> writes:

> yes, I grepped around in pkgsrc tree and at least some patches show
> packages used similar scheme for detecting depends ....
>
> Does it matter that I run make (on NetBSD) directly from directory with my
> package files and not from top of pkgsrc? Also, I run it as root.

It is normal to run make from /usr/pkgsrc/category/pkgdir.

It is not best practice to run as root, and the standard advice is to
use su/sudo for pkgsrc to get privileges for package-install and
replace.  A common config in mk.conf, for those that don't hate sudo,
is:

  nSU_CMD=                      sudo /bin/sh -c

But it is unlikely that building as root is related to your problem.


>> Look at work/.buildlink*.  Read the pgksrc guide (pkgsrc/doc/pkgsrc.txt)
>> about the buildlink3 scheme.
>>
>> pkgsrc in general works very well with autoconf-using programs.
>
> Yes, but for some reason for exactly those lines I added some time ago it
> does not. May be it assumes configure script calls autoconf machinery for
> this, and not use pkg-config directly?

I am suggesting that you look in the work directory and see what the bl3
machinery has actually done, rather than you assuming that it did what
you thought it would do.  The path to debugging success is usually to
look at intermediate stages and find the place where your assumptions
are wrong.

> I wonder if pkg-config from work/.tools confused by 2>/dev/null redirection?

A fair question, but first see what is in work/.buildlink tree for
pkgconfig files.

> So, while I think adding pkg-config to USE_TOOLS variable in my package
> actually good idea (will do this) - I do not know how to debug this

Understand the bl3 system by reading the guide, as I said, and then look
at everything under work/ that is not in your packages build dir.
Do this also for some package that uses pkg-config that builds ok.


I used example in " 17.3. Tools provided by platforms" and redefined in my Makefile pkg-config back to being actual file. Also fixed patch-ac.

Now it works at least on my netbsd 9.4 i486 qemu VM :) without pkglint errors.

I wonder when I should enable additional architectures for testing? Before package enters (hopefully) main pkgsrc tree or after?




Home | Main Index | Thread Index | Old Index