Re: [Firebird-devel] How to install a local source build for testing purposes?

2020-08-27 Thread Ian Lawrence Barwick
2020年8月27日(木) 23:58 Adriano dos Santos Fernandes :
>
> On 27/08/2020 11:48, Ian Lawrence Barwick wrote:
> > 2020年8月27日(木) 23:28 Ian Lawrence Barwick :
(...)
> > OK, I can get it to work by using sudo; is it possible it's expecting
> > to run as a
> > different user (e.g. "firebird") rather than the user I compiled this with?
> >
> >
> If you have already a Firebird server installed, /tmp/firebird will need
> the firebird group, so your user must have that group.

Thanks, that was the other element which was missing.

Related to that:

- is it problematic if more than one Firebird instance is using that directory?
- is it possible to specify a different directory for the Firebird 4
instance running in my user account?

Anyway everything is now more-or-less working, many thanks for everyone's help!

Regards

Ian Barwick


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] How to install a local source build for testing purposes?

2020-08-27 Thread Ian Lawrence Barwick
2020年8月27日(木) 23:48 Alex Peshkoff via Firebird-devel
:
>
> On 2020-08-27 17:28, Ian Lawrence Barwick wrote:
>
> > I tried this:
> >
> >$ FIREBIRD=/path/to/firebird/src/gen/Release/firebird/ ./bin/isql  
> > employee
>
> src is unneded here - gen is not in src

Ah, that's just there because the source is in ~/firebird/src/ ...

> >Statement failed, SQLSTATE = HY000
> >operating system directive access failed
> >-Not a directory
> >Use CONNECT or CREATE DATABASE to specify a database
> >
> > (which seems necessary for the .msg file and presumably configuration files)
> > and several variations, all with the same error message.
> >
> > I also tried hard-coding the employee and security database paths in
> > the .conf files
> > in the $FIREBIRD directory, no change.
> >
> > All files in the $FIREBIRD directory path are owned by the same (non-root) 
> > user.
> >
> > Any further assistance much appreciated.
>
> Sorry - looks like I've forgotten --enable-binreloc configure switch.

That seems to have helped, I could connect via isql from the local system user.


Thanks

Ian Barwick


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] How to install a local source build for testing purposes?

2020-08-27 Thread Ian Lawrence Barwick
2020年8月27日(木) 23:28 Ian Lawrence Barwick :
>
> 2020年8月25日(火) 18:02 Alex Peshkoff via Firebird-devel
> :
> >
> > On 2020-08-25 05:07, Ian Lawrence Barwick wrote:
> (...)
> > > ./configure --prefix=/opt/firebird4 \
> > >--with-editline \
> >
> > Almost for sure --with-system-editline will be better - builtin editline
> > is used in distributed binaries just to satisfy license.
>
> Thanks, noted.
>
> (...)
>
> > > Thanks for any pointers
> >
> > You may use no-install approach - run where it was built.
>
> Aha, that would be fine.
>
> > Just add
> > SYSDBA user to security database in build dir (gen/Release/firebird)
> >
> >  # cd gen/Release/firebird/bin
> >  # ./isql employee
> >  SQL> create user sysdba password 'masterkey';
>
> That unfortunately doesn't work:
>
>   $ ./isql employee
>   Statement failed, SQLSTATE = 08006
>   Unable to complete network request to host "localhost".
>   -Failed to establish a connection.
>   Use CONNECT or CREATE DATABASE to specify a database
>   SQL>
>
> I tried this:
>
>   $ FIREBIRD=/path/to/firebird/src/gen/Release/firebird/ ./bin/isql  employee
>   Statement failed, SQLSTATE = HY000
>   operating system directive access failed
>   -Not a directory
>   Use CONNECT or CREATE DATABASE to specify a database
>
> (which seems necessary for the .msg file and presumably configuration files)
> and several variations, all with the same error message.
>
> I also tried hard-coding the employee and security database paths in
> the .conf files
> in the $FIREBIRD directory, no change.
>
> All files in the $FIREBIRD directory path are owned by the same (non-root) 
> user.

OK, I can get it to work by using sudo; is it possible it's expecting
to run as a
different user (e.g. "firebird") rather than the user I compiled this with?

Anyway a start:

  SQL> SELECT CAST(rdb$get_context('SYSTEM', 'ENGINE_VERSION') AS
VARCHAR(10)) FROM rdb$database;

  CAST
  ==
  4.0.0


Thanks

Ian Barwick


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] How to install a local source build for testing purposes?

2020-08-27 Thread Ian Lawrence Barwick
2020年8月25日(火) 18:02 Alex Peshkoff via Firebird-devel
:
>
> On 2020-08-25 05:07, Ian Lawrence Barwick wrote:
(...)
> > ./configure --prefix=/opt/firebird4 \
> >--with-editline \
>
> Almost for sure --with-system-editline will be better - builtin editline
> is used in distributed binaries just to satisfy license.

Thanks, noted.

(...)

> > Thanks for any pointers
>
> You may use no-install approach - run where it was built.

Aha, that would be fine.

> Just add
> SYSDBA user to security database in build dir (gen/Release/firebird)
>
>  # cd gen/Release/firebird/bin
>  # ./isql employee
>  SQL> create user sysdba password 'masterkey';

That unfortunately doesn't work:

  $ ./isql employee
  Statement failed, SQLSTATE = 08006
  Unable to complete network request to host "localhost".
  -Failed to establish a connection.
  Use CONNECT or CREATE DATABASE to specify a database
  SQL>

I tried this:

  $ FIREBIRD=/path/to/firebird/src/gen/Release/firebird/ ./bin/isql  employee
  Statement failed, SQLSTATE = HY000
  operating system directive access failed
  -Not a directory
  Use CONNECT or CREATE DATABASE to specify a database

(which seems necessary for the .msg file and presumably configuration files)
and several variations, all with the same error message.

I also tried hard-coding the employee and security database paths in
the .conf files
in the $FIREBIRD directory, no change.

All files in the $FIREBIRD directory path are owned by the same (non-root) user.

Any further assistance much appreciated.


Regards

Ian Barwick


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] How to install a local source build for testing purposes?

2020-08-24 Thread Ian Lawrence Barwick
Hi

I maintain the PostgreSQL foreign data wrapper (FDW) for Firebird [1] and am
planning to verify it against Firebird 4 to check for compatibility,
new features
which need supporting etc.

[1] https://github.com/ibarwick/firebird_fdw/

To which end I thought I'd try building it from source (which I've never done
before for Firebird). Configuration done like this:

./configure --prefix=/opt/firebird4 \
  --with-editline \
  --with-service-port=3051 \

The actual "make" process went fine, following instructions found here:

https://firebirdsql.org/en/building-the-code-posix/

but "make install" seems quite invasive as it requires root and complains
if there's a running Firebird instance (I have 3.0.x running from standard
packages), e.g.

$ sudo make install
Firebird 4.0.0.2178-ReleaseCandidate1.amd64 Installation

Press Enter to start installation or ^C to abort

An instance of the Firebird server seems to be running.
Please quit all Firebird applications and then proceed.

It also seems to want to copy files to "/usr/include/" (which
would overwrite package-installed files and generally mess things up).

What I would like to do is create a local installation in an arbitrary
directory and run it independently from any existing installations
for development purposes. Is this possible, and if so how?

Thanks for any pointers

Ian Barwick


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel