bug-ncurses
[Top][All Lists]
Advanced

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

Re: Getting pkgconfig to a specific location


From: Vincent Fortier
Subject: Re: Getting pkgconfig to a specific location
Date: Sat, 8 Jan 2022 17:32:19 -0500

Le sam. 8 janv. 2022 à 17:08, Thomas Dickey <dickey@his.com> a écrit :
>
> On Mon, Jan 03, 2022 at 09:30:32PM -0500, Vincent Fortier wrote:
> > Hi thomas,
> >
> > Le lun. 3 janv. 2022 à 17:27, Thomas Dickey <dickey@his.com> a écrit :
> > >
> > > On Mon, Jan 03, 2022 at 08:36:43AM -0500, Vincent Fortier wrote:
> > > > Hi,
> > > >
> > > > I'm a community dev working on the SynoCommunity project.  We're using
> > > > ncurses for multiple opensource packages that we integrate so they can
> > > > be installed on Synology NAS (which uses linux).
> > > >
> > > > While trying to update ncurses to 6.3 I tried (once more) to modify
> > > > the pkgconfig location to another location.  Under synology NAS each
> > > > application is self-contained and installed under
> > > > /var/packages/<app>/target.  When cross-compiling our installation
> > > > prefix is set as such which lead to having pkgconfig directory to sit
> > > > under $(INSTALL_PREFIX)/lib/pkgconfig.  That $(INSTALL_PREFIX) sits
> > > > under our working directory $(INSTALL_DIR).
> > > >
> > > > >From the documentation the following two are obvious:
> > > > --prefix=$(INSTALL_PREFIX)
> > > > --with-install-prefix=$(INSTALL_DIR)   --> or using DESTDIR at make 
> > > > install time
> > >
> > > hmm - "--with-install-prefix" isn't intended as the pathname by
> > > which an application finds the data.  It is a configure-time
> > > version of $DESTDIR (which relocates the installed data,, making
> > > it simple(r) to construct CD images, etc.).
> >
> > Indeed, while doing additional testing it isn't needed at all as the
> > framework provides all of what's needed anyway.
>
> good - then a workaround isn't needed,
> just confirmation that the bug is known (and fixed).
>
> > > that said, the ncurses build scripts shouldn't be repeating 
> > > '$(INSTALL_DIR)'.
> >
> > And I think there's a bug there.
> >
> > > But the configure script can be confused, since it wouldn't see
> > > that as an absolute pathname such as "/whatever/lib/pkgconfig",
> > > and would attempt to add an absolute prefix in front.
> > >
> > > That's in 6.3-release.  In post-6.3 development, I've relaxed that
> > > a little (mainly for users who want to configure when the pkgconfig
> > > directory does not yet exist).
> > >
> > > So... to let me understand the problem better, it would help to have
> > > a script which shows the complete configure-command that you're trying.
> > >
> > > Given that, I can either offer some advice on workarounds, to attempt
> > > to solve the problem :-)
> >
> > Indeed it looks like the configure script is confused and adding the
> > DESTDIR to the path for an unknown reason.  Here is the output from
> > the build log:
> > ** Configuration summary for NCURSES 6.3 20211021:
> >
> >        extended funcs: yes
> >        xterm terminfo: xterm-new
> >
> >         bin directory: /usr/local/ncurses/bin
> >         lib directory: /usr/local/ncurses/lib
> >     include directory: /usr/local/ncurses/include
> >         man directory: /usr/local/ncurses/share/man
> >    terminfo directory: /usr/local/ncurses/share/terminfo
> >  pkg-config directory:
> > /home/spksrc/gdbm-ncurse/spksrc/cross/ncurses/work-kvmx64-7.0/install//usr/local/ncurses/lib/pkgconfig
>
> You have the environment variable PKG_CONFIG_LIBDIR set:
>
>         
> PKG_CONFIG_LIBDIR=/home/spksrc/gdbm-ncurse/spksrc/cross/ncurses/work-kvmx64-7.0/install//usr/local/ncurses/lib/pkgconfig
>
> If it's set, and the corresponding directory exists, then
> the configure script attempts to use it.
>
> That's in an area that I've modified since 6.3
> (the directory doesn't have to exist since that was a problem for some users,
> and the environment variable no longer overrides the command-line option).
>
> > And here is my configuration (considering destination directory is
> > provided by the framework so no argument needed):
> > CONFIGURE_ARGS  = --with-shared
> > CONFIGURE_ARGS += --with-terminfo-dirs=$(INSTALL_PREFIX)/share/terminfo
> > CONFIGURE_ARGS += --with-pkg-config-libdir=$(INSTALL_PREFIX)/lib/pkgconfig
> > CONFIGURE_ARGS += --without-manpages
> > CONFIGURE_ARGS += --without-tests
> > CONFIGURE_ARGS += --enable-rpath
> > CONFIGURE_ARGS += --enable-overwrite
> > CONFIGURE_ARGS += --enable-pc-files
> > CONFIGURE_ARGS += --disable-stripping
> > CONFIGURE_ARGS += --disable-widec
> > CONFIGURE_ARGS += --disable-home-terminfo
> >
> > I have opened a PR at
> > https://github.com/SynoCommunity/spksrc/pull/5047 (it also includes an
> > update for gdbm but irrelevant for this).  There will be a log output
> > for all packages depending on ncurses.  In there you should have the
> > detailed output.  I've also attached one for immediate reference.
>
> I reduced that to a test-script (attached), and can see that it's been fixed.

I'll have a second look at the scripts but interestingly when I remove
the --with-pkg-config-libdir option it ends-up going here:
$ ll work-kvmx64-7.0/install/usr/lib/x86_64-linux-gnu/pkgconfig/*
-rw-r--r-- 1 spksrc spksrc 961 Jan  8 22:29
work-kvmx64-7.0/install/usr/lib/x86_64-linux-gnu/pkgconfig/form.pc
-rw-r--r-- 1 spksrc spksrc 961 Jan  8 22:29
work-kvmx64-7.0/install/usr/lib/x86_64-linux-gnu/pkgconfig/menu.pc
-rw-r--r-- 1 spksrc spksrc 990 Jan  8 22:29
work-kvmx64-7.0/install/usr/lib/x86_64-linux-gnu/pkgconfig/ncurses++.pc
-rw-r--r-- 1 spksrc spksrc 953 Jan  8 22:29
work-kvmx64-7.0/install/usr/lib/x86_64-linux-gnu/pkgconfig/ncurses.pc
-rw-r--r-- 1 spksrc spksrc 963 Jan  8 22:29
work-kvmx64-7.0/install/usr/lib/x86_64-linux-gnu/pkgconfig/panel.pc

instead of usr/local/lib/pkgconfig ...  Unless there is another
environment variable that could have a side-effect?

>
> --
> Thomas E. Dickey <dickey@invisible-island.net>
> https://invisible-island.net
> ftp://ftp.invisible-island.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]