Skip to content

Add Ubuntu/debian note for configure script#5

Open
mkgrgis wants to merge 3 commits intoibarwick:masterfrom
mkgrgis:patch-1
Open

Add Ubuntu/debian note for configure script#5
mkgrgis wants to merge 3 commits intoibarwick:masterfrom
mkgrgis:patch-1

Conversation

@mkgrgis
Copy link

@mkgrgis mkgrgis commented Jan 1, 2023

No description provided.

@ibarwick
Copy link
Owner

I don't understand the need to provide this oddly specific information for a particular distribution family at this point.

As a general note, if you are sending in PRs and realise changes are needed, please rebase into a single commit nd force-push; it's much easier to review that way.

@mkgrgis
Copy link
Author

mkgrgis commented Jan 11, 2023

I think default configuration of make is suitable for Fedora/RHEL family. So Ubuntu/Debian is popular family of GNU/Linux too, but not covered by makefile defaults, it's problem.

@ibarwick
Copy link
Owner

The default value for --prefix is /usr/local, which has been standard practice pretty much for ever on Unix-like systems for locally-built applications/libraries; this keeps such files away from system-installed packages etc. I don't see why Debian/Ubuntu is any different in that respect; I always build with the default /usr/local prefix on Debian/Ubuntu and don't have any issues.

@mkgrgis
Copy link
Author

mkgrgis commented Jan 12, 2023

Excuse me, @ibarwick, but what about ibarwick/firebird_fdw@4ce1f1a ? No problem with separate libfq, yes. But in complex there is problems on Ubuntu/Debian family. Some problems were fixed for Ubuntu/Debian https://github.com/ibarwick/firebird_fdw/blob/master/doc/INSTALL-debian-ubuntu.md , but there were no changes for libfq make process.
For example for Ubuntu

ls /usr/local/
bin  etc  games  lib  man  sbin  share  src

lib is empty and no include .
For

ls /usr
bin      games lib       lib64   libx32  share
include  lib32 libexec   local   sbin    src

both include and lib are full of files.

For Debian there is something similar

ls /usr/local
bin  etc  games  man  sbin  share  src

but

ls /usr
bin      games    lib32    libx32      sbin
include  lib64    local    share       lib
libexec  src

I don't know why Debian and Ubuntu not stick to the usual practice of Unix filesystems.

@ibarwick
Copy link
Owner

I still don't understand what problem you are trying to solve here.

It's normal for directories under /usr/local to be empty, because the whole point is that user-generated files can be placed there. That's the case both on RedHat and Ubuntu distributions, and probably most Unix-derived systems.

You can, if you wish, configure libfq to install the generated files somewhere else, that's the whole point of having options like --prefix.

@mkgrgis
Copy link
Author

mkgrgis commented Jan 12, 2023

I still don't understand what problem you are trying to solve here.

Maybe real problem is near search paths (LD_LIBRARY_PATH ?) for libfq. See #3 for details.
OK, sudo experiment with Ubuntu default environment.

  1. Before
find /usr -iname "*libfq*"
/usr/lib/libfq-0.5.0.so
/usr/lib/libfq.so
/usr/lib/libfq.a
/usr/lib/libfq.la
/usr/include/libfq.h
/usr/include/libfq-expbuffer.h
/usr/include/libfq-int.h
  1. Move libfq to usual location
mkdir /usr/local/include /usr/local/lib;
chmod og+r-w+x -v /usr/local/include /usr/local/lib;
mv -v /usr/lib/libfq* /usr/local/lib
  1. Check fbsql or firebird_fdw
fbsql -d localhost:/tmp/テスト.fdb -u sysdba -p masterkey
fbsql: error while loading shared libraries: libfq-0.5.0.so: cannot open shared object file: No such file or directory
  1. Revert for success .so call: mv -v /usr/local/lib/libfq* /usr/lib

@mkgrgis
Copy link
Author

mkgrgis commented Jan 16, 2023

Other form of problem of search addresses is described here https://github.com/ibarwick/libfq/blob/master/INSTALL.md#known-ibaseh-locations

@mkgrgis
Copy link
Author

mkgrgis commented Jan 18, 2025

@ibarwick , maybe you can add a check clause like

distr=$(cat /etc/issue | cut -f 1 -d ' ');
if [ "$distr" == "Debian" ] || [ "$distr" == "Ubuntu" ] || [ "$distr" == "Mint" ]; then
  ac_default_prefix=/usr
else
  ac_default_prefix=/usr /local
fi

near

libfq/configure

Line 581 in f9d0e2c

ac_default_prefix=/usr/local
? How douse other configure i other repos scripts resolve this Debain-derivative case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments