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?





вт, 9 июл. 2024 г., 09:39 Martin Husemann <martin%duskware.de@localhost>:
On Mon, Jul 08, 2024 at 12:17:13PM +0200, Jörg Sonnenberger wrote:
> On Sunday, July 7, 2024 1:19:14?AM GMT+2 Andrew Randrianasulu wrote:
> > Another part of our unportability related to way we use /proc for getting
> > our own executable name/path. Is there more portable way to do so?
>
> The first question is always, why would you want to know that.

If this is to get at the binary resource linked into your executable,
an alternative may be to play with linker scripts and use dlsym(NULL,...)
to find them (if they are loadable and have a symbol marking their start
and end).

not really, as far as I understand code at least it used for internal forking for re-launching same probgar for background rendering:


line 128 at

https://git.cinelerra-gg.org/git/?p=goodguy/cinelerra.git;a=blob;f=cinelerra-5.1/cinelerra/brender.C;h=49580c9f041fbed049476333285ab46bc6d818b2;hb=HEAD

also in ./cinelerra/mwindow.C for dumping (printing) details about executable.

in guicast/bctrace.C /proc used for dumping shared memory parameters.

in ./cinelerra/indexfile.C /proc/mounts used optionally for getting udf volume id (for bluray creation?)

in ./cinelerra/file.C  /proc used for function get_exec_path but it probably unused right now?

in ./cinelerra/main.C it used for automatic program restart

in ./guicast/bcsignals.C procfs used for killing subprocesses (forked early, I guess).

Biggest cpu-arch dependent part in guicast/Makefile

https://git.cinelerra-gg.org/git/?p=goodguy/cinelerra.git;a=blob;f=cinelerra-5.1/guicast/Makefile;h=49bd154c6cb0859eff6b11205c21ffda43d4d135;hb=HEAD

where we set variable BOOTSTRAP for objcopy command used in bootstrap.C

https://git.cinelerra-gg.org/git/?p=goodguy/cinelerra.git;a=blob;f=cinelerra-5.1/guicast/bootstrap.c;h=0ba35514ea67be66418571ae268d7cd3335493cf;hb=HEAD

right now file have cases for i386/586, amd64, arm7/8l, aarch64, ppc/ppc64 

Anything else will error out while building ...


Martin


Home | Main Index | Thread Index | Old Index