Static build of libpq fails

Started by Dave Pagealmost 22 years ago6 messagespatches
Jump to latest
#1Dave Page
dpage@pgadmin.org

Hi,

I tried building a static libpq with Mingw, which it seems doesn't work
any more:

make[3]: *** No rule to make target `libpq.a', needed by
`all-static-lib'. Stop.
make[3]: Leaving directory `/cvs/pgsql/src/interfaces/libpq'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/cvs/pgsql/src/interfaces'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/cvs/pgsql/src'
make: *** [all] Error 2

I can work around this easily enough, however it should obviously get
fixed at some point.

Regards, Dave

#2Bruce Momjian
bruce@momjian.us
In reply to: Dave Page (#1)
Re: Static build of libpq fails

Dave Page wrote:

Hi,

I tried building a static libpq with Mingw, which it seems doesn't work
any more:

make[3]: *** No rule to make target `libpq.a', needed by
`all-static-lib'. Stop.
make[3]: Leaving directory `/cvs/pgsql/src/interfaces/libpq'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/cvs/pgsql/src/interfaces'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/cvs/pgsql/src'
make: *** [all] Error 2

I can work around this easily enough, however it should obviously get
fixed at some point.

I got it working easily by doing 'gmake all-static-lib' from the
src/interfaces/libpq directory. Is it supposed to work somewhere else?

The attached patch adds some pg_config_paths.h dependencies that are
missing. I am now wondering if we should have that file generated by
configure, but that defeats the ability to modify Makefile.global to
change settings so I guess we are stuck with what we have currently.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Attachments:

/bjm/difftext/plainDownload+22-16
#3Dave Page
dpage@pgadmin.org
In reply to: Bruce Momjian (#2)
Re: Static build of libpq fails

-----Original Message-----
From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]
Sent: 12 October 2004 02:08
To: Dave Page
Cc: pgsql-hackers-win32@postgresql.org; PostgreSQL-patches
Subject: Re: [pgsql-hackers-win32] Static build of libpq fails

Dave Page wrote:

Hi,

I tried building a static libpq with Mingw, which it seems doesn't
work any more:

make[3]: *** No rule to make target `libpq.a', needed by
`all-static-lib'. Stop.
make[3]: Leaving directory `/cvs/pgsql/src/interfaces/libpq'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/cvs/pgsql/src/interfaces'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/cvs/pgsql/src'
make: *** [all] Error 2

I can work around this easily enough, however it should

obviously get

fixed at some point.

I got it working easily by doing 'gmake all-static-lib' from
the src/interfaces/libpq directory. Is it supposed to work
somewhere else?

$ ./configure --disable-shared; make all

Will fail (and still does with cvs tip). I normally use that on Linux -
I assume it should also work on Mingw.

Regards, Dave

#4Noreen Jaster
njaster909@charter.net
In reply to: Dave Page (#3)
Re: Static build of libpq fails

PLEASE DO NOT SEND ME ANY MORE MAIL I DON'T KNOW WHO YOU ARE OR WHAT YOU ARE
TALKING ABOUT> THANK YOU

-----Original Message-----
From: pgsql-hackers-win32-owner@postgresql.org
[mailto:pgsql-hackers-win32-owner@postgresql.org]On Behalf Of Dave Page
Sent: Tuesday, October 12, 2004 4:50 AM
To: Bruce Momjian
Cc: pgsql-hackers-win32@postgresql.org; PostgreSQL-patches
Subject: Re: [pgsql-hackers-win32] Static build of libpq fails

-----Original Message-----
From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]
Sent: 12 October 2004 02:08
To: Dave Page
Cc: pgsql-hackers-win32@postgresql.org; PostgreSQL-patches
Subject: Re: [pgsql-hackers-win32] Static build of libpq fails

Dave Page wrote:

Hi,

I tried building a static libpq with Mingw, which it seems doesn't
work any more:

make[3]: *** No rule to make target `libpq.a', needed by
`all-static-lib'. Stop.
make[3]: Leaving directory `/cvs/pgsql/src/interfaces/libpq'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/cvs/pgsql/src/interfaces'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/cvs/pgsql/src'
make: *** [all] Error 2

I can work around this easily enough, however it should

obviously get

fixed at some point.

I got it working easily by doing 'gmake all-static-lib' from
the src/interfaces/libpq directory. Is it supposed to work
somewhere else?

$ ./configure --disable-shared; make all

Will fail (and still does with cvs tip). I normally use that on Linux -
I assume it should also work on Mingw.

Regards, Dave

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

#5Bruce Momjian
bruce@momjian.us
In reply to: Dave Page (#3)
Re: [pgsql-hackers-win32] Static build of libpq fails

I was able to reproduce the failure, and the attached applied patch
fixes the problem. Seems someone just disable the libpq.a make rule in
Makefile.shlib, probably because it didn't used to work, but it does
now. I am not sure about Cygwin but our build experience so far is that
if it works on Win32, it works on Cygwin, so I enabled it for both.

---------------------------------------------------------------------------

Dave Page wrote:

-----Original Message-----
From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]
Sent: 12 October 2004 02:08
To: Dave Page
Cc: pgsql-hackers-win32@postgresql.org; PostgreSQL-patches
Subject: Re: [pgsql-hackers-win32] Static build of libpq fails

Dave Page wrote:

Hi,

I tried building a static libpq with Mingw, which it seems doesn't
work any more:

make[3]: *** No rule to make target `libpq.a', needed by
`all-static-lib'. Stop.
make[3]: Leaving directory `/cvs/pgsql/src/interfaces/libpq'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/cvs/pgsql/src/interfaces'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/cvs/pgsql/src'
make: *** [all] Error 2

I can work around this easily enough, however it should

obviously get

fixed at some point.

I got it working easily by doing 'gmake all-static-lib' from
the src/interfaces/libpq directory. Is it supposed to work
somewhere else?

$ ./configure --disable-shared; make all

Will fail (and still does with cvs tip). I normally use that on Linux -
I assume it should also work on Mingw.

Regards, Dave

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Attachments:

/bjm/difftext/plainDownload+0-6
#6Dave Page
dpage@pgadmin.org
In reply to: Bruce Momjian (#5)
Re: [pgsql-hackers-win32] Static build of libpq fails

-----Original Message-----
From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]
Sent: 13 October 2004 10:52
To: Dave Page
Cc: pgsql-hackers-win32@postgresql.org; PostgreSQL-patches;
PostgreSQL Cygwin mailing list
Subject: Re: [pgsql-hackers-win32] Static build of libpq fails

I was able to reproduce the failure, and the attached applied
patch fixes the problem. Seems someone just disable the
libpq.a make rule in Makefile.shlib, probably because it
didn't used to work, but it does now. I am not sure about
Cygwin but our build experience so far is that if it works on
Win32, it works on Cygwin, so I enabled it for both.

Yup, looks good here on Mingw. Thanks Bruce.

Regards, Dave.