Re: [Desktop-packages] [Bug 1068150] Re: programs do not link against libpq on precise

2012-10-19 Thread Eric House
> Oh, can you please try with > > gcc -I$(pg_config --includedir) -L$(pg_config --libdir) > test_postgres.c -lpq Putting -lpq after the .c file name fixes it. But it'll still be a problem for Makefiles that append -lpq to LDFLAGS. That worked on natty but at a minimum Makefiles will have to be

[Desktop-packages] [Bug 1068150] Re: programs do not link against libpq on precise

2012-10-18 Thread Eric House
I ran the above gcc under strace: strace -f gcc -I$(pg_config --includedir) -L$(pg_config --libdir) -lpq test_postgres.c 2> strace.txt ** Attachment added: "strace output" https://bugs.launchpad.net/ubuntu/+source/postgresql-9.1/+bug/1068150/+attachment/3403637/+files/strace.txt.gz -- You re

[Desktop-packages] [Bug 1068150] Re: programs do not link against libpq on precise

2012-10-18 Thread Eric House
eehouse@trand:~/tmp$ cat test_postgres.c #include #include int main( int argc, char** argv ) { PQfinish(NULL); exit(1); } eehouse@trand:~/tmp$ gcc -I$(pg_config --includedir) -L$(pg_config --libdir) -lpq test_postgres.c /tmp/ccIwPp4g.o: In function `main': test_postgres.c:(.text+0x11):

[Desktop-packages] [Bug 1068150] Re: programs do not link against libpq on precise

2012-10-18 Thread Eric House
I can repro this on a precise system upgraded from natty and one installed from scratch, so don't think the postgres upgrade to 9.1 is at fault. -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to postgresql-9.1 in Ubuntu. https://bugs.launch

[Desktop-packages] [Bug 1068150] [NEW] programs do not link against libpq on precise

2012-10-18 Thread Eric House
Public bug reported: The following trivial program will not link on precise, but did on natty and does on Debian stable. #include #include // build command: // gcc -I$(pg_config --includedir) -L$(pg_config --libdir) -lpq test_postgres.c int main( int argc, char** argv ) { PQfinish(NULL);