473,396 Members | 1,758 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

8.0.0beta2: gcc: unrecognized option `-pthreads'

Is this pthreads warning of any concern?

gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes
-Wmissing-declarations -pthread -pthreads -D_REENTRANT -D_THREAD_SAFE
-D_POSIX_PTHREAD_SEMANTICS -fpic -shared -Wl,-soname,libecpg.so.4 execute.o
typename.o descriptor.o data.o error.o prepare.o memory.o connect.o misc.o
path.o exec.o -L../../../../src/port -L../pgtypeslib -lpgtypes
-L../../../../src/interfaces/libpq -lpq -lcrypt -lm -lpthread
-Wl,-rpath,/opt/pgsql/installs/postgresql-8.0.0beta2/lib -o libecpg.so.4.2
gcc: unrecognized option `-pthreads'

Ed
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 23 '05 #1
5 2978
Ed L. wrote:
Is this pthreads warning of any concern?

gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes
-Wmissing-declarations -pthread -pthreads -D_REENTRANT -D_THREAD_SAFE
-D_POSIX_PTHREAD_SEMANTICS -fpic -shared -Wl,-soname,libecpg.so.4 execute.o
typename.o descriptor.o data.o error.o prepare.o memory.o connect.o misc.o
path.o exec.o -L../../../../src/port -L../pgtypeslib -lpgtypes
-L../../../../src/interfaces/libpq -lpq -lcrypt -lm -lpthread
-Wl,-rpath,/opt/pgsql/installs/postgresql-8.0.0beta2/lib -o libecpg.so.4.2
gcc: unrecognized option `-pthreads'


No. The problem is that the test script just tries all options and if
it doesn't error out, it uses it. Ideally we could test from configure
and ingnore meaningless options but we don't know how yet.

--
Bruce Momjian | http://candle.pha.pa.us
pg***@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

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 23 '05 #2
Bruce Momjian <pg***@candle.pha.pa.us> writes:
No. The problem is that the test script just tries all options and if
it doesn't error out, it uses it. Ideally we could test from configure
and ingnore meaningless options but we don't know how yet.


Drop any options that cause the compiler to write anything on stderr.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 23 '05 #3
Tom Lane wrote:
Bruce Momjian <pg***@candle.pha.pa.us> writes:
No. The problem is that the test script just tries all options and if
it doesn't error out, it uses it. Ideally we could test from configure
and ingnore meaningless options but we don't know how yet.


Drop any options that cause the compiler to write anything on stderr.


OK, the configure test is:

AC_TRY_LINK([#include <pthread.h>],
[pthread_t th; pthread_join(th, 0);
pthread_attr_init(0); pthread_cleanup_push(0, 0);
pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
[acx_pthread_ok=yes], [acx_pthread_ok=no])

Seems we can't just jump in there and grab stderr so I added the
following code to CVS which should do the trick.

--
Bruce Momjian | http://candle.pha.pa.us
pg***@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

Index: configure
================================================== =================
RCS file: /cvsroot/pgsql-server/configure,v
retrieving revision 1.391
diff -c -c -r1.391 configure
*** configure 10 Sep 2004 13:53:39 -0000 1.391
--- configure 10 Sep 2004 23:55:53 -0000
***************
*** 13325,13342 ****
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext

LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"

echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
echo "${ECHO_T}$acx_pthread_ok" >&6
- if test "x$acx_pthread_ok" = xyes; then
- # we continue with more flags because Linux needs -lpthread
- # for libpq builds on PostgreSQL. The test above only
- # tests for building binaries, not shared libraries.
- PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
- PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
- fi
done
fi

--- 13325,13356 ----
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext

+ if test "x$acx_pthread_ok" = xyes; then
+ # Don't use options that are ignored by the compiler.
+ # We find them by checking stderror.
+ cat >conftest.$ac_ext <<_ACEOF
+ int
+ main ()
+ {
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if test "`(eval $ac_link 2>&1 >/dev/null)`" = ""; then
+ # we continue with more flags because Linux needs -lpthread
+ # for libpq builds on PostgreSQL. The test above only
+ # tests for building binaries, not shared libraries.
+ PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
+ PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
+ else acx_pthread_ok=no
+ fi
+ fi
+
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"

echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
echo "${ECHO_T}$acx_pthread_ok" >&6
done
fi

Index: config/acx_pthread.m4
================================================== =================
RCS file: /cvsroot/pgsql-server/config/acx_pthread.m4,v
retrieving revision 1.6
diff -c -c -r1.6 acx_pthread.m4
*** config/acx_pthread.m4 17 Aug 2004 15:19:09 -0000 1.6
--- config/acx_pthread.m4 10 Sep 2004 23:55:54 -0000
***************
*** 129,145 ****
pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
[acx_pthread_ok=yes], [acx_pthread_ok=no])

LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"

AC_MSG_RESULT($acx_pthread_ok)
- if test "x$acx_pthread_ok" = xyes; then
- # we continue with more flags because Linux needs -lpthread
- # for libpq builds on PostgreSQL. The test above only
- # tests for building binaries, not shared libraries.
- PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
- PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
- fi
done
fi

--- 129,159 ----
pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
[acx_pthread_ok=yes], [acx_pthread_ok=no])

+ if test "x$acx_pthread_ok" = xyes; then
+ # Don't use options that are ignored by the compiler.
+ # We find them by checking stderror.
+ cat >conftest.$ac_ext <<_ACEOF
+ int
+ main ()
+ {
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if test "`(eval $ac_link 2>&1 >/dev/null)`" = ""; then
+ # we continue with more flags because Linux needs -lpthread
+ # for libpq builds on PostgreSQL. The test above only
+ # tests for building binaries, not shared libraries.
+ PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
+ PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
+ else acx_pthread_ok=no
+ fi
+ fi
+
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"

AC_MSG_RESULT($acx_pthread_ok)
done
fi

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 23 '05 #4
Bruce Momjian <pg***@candle.pha.pa.us> writes:
Tom Lane wrote:
Bruce Momjian <pg***@candle.pha.pa.us> writes:
No. The problem is that the test script just tries all options and if
it doesn't error out, it uses it. Ideally we could test from configure
and ingnore meaningless options but we don't know how yet.
Drop any options that cause the compiler to write anything on stderr.

OK, the configure test is:


BTW, I had some second thoughts about this later: if the compiler
generates warnings only for certain *combinations* of switches, it
seems likely that a simplistic test would get things wrong. Let's
try this patch, but be alert for possible problems.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 23 '05 #5
Tom Lane wrote:
Bruce Momjian <pg***@candle.pha.pa.us> writes:
Tom Lane wrote:
Bruce Momjian <pg***@candle.pha.pa.us> writes:
No. The problem is that the test script just tries all options and if
it doesn't error out, it uses it. Ideally we could test from configure
and ingnore meaningless options but we don't know how yet.

Drop any options that cause the compiler to write anything on stderr.

OK, the configure test is:


BTW, I had some second thoughts about this later: if the compiler
generates warnings only for certain *combinations* of switches, it
seems likely that a simplistic test would get things wrong. Let's
try this patch, but be alert for possible problems.


Ah, but we test the accumulation of flags, not just each flag in
isolation:

LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"

so we should be fine.

--
Bruce Momjian | http://candle.pha.pa.us
pg***@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

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 23 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: frankg | last post by:
When I compile this file ------------------------------------------------------ #include <stdarg.h> template <class Any> void var_arg_func(int dimension_count, ...) { int dimensions;...
0
by: Rolf Hemmerling | last post by:
Hello ! How to let GPP/GCC read command line switches from a file, **for Windows** ? I was told a Linux solution: "Your options in options.txt Then: gcc $(cat options.txt) or: gcc `cat...
1
by: Dave Dons | last post by:
GCC 3.3.4 setting Stack and Heap Help appreciated setting stack (and heap) in GCC in Linux: gcc (GCC) 3.2.3 (mingw special 20030504-1) has no problems with: g++...
0
by: Norm Wong | last post by:
If anyone is interested in using db2uext2 with Cygwin gcc compiler on Windows, I've modified the IBM provided sample with the attached file. There are two main modifications. The mkdir command...
3
by: Georg | last post by:
Hello, I must be doing something wrong, but I don't get it: - compile gcc -c -O -Iinc src/hello.c -o obj/hello.o gcc -c -O -Iinc src/msg_1.c -o obj/msg_1.o gcc -c -O -Iinc src/msg_2.c -o...
1
by: Georgi Chorbadzhiyski | last post by:
I just experienced the same problem with 8.0.0beta2. http://archives.postgresql.org/pgsql-bugs/2004-08/msg00086.php -- Georgi Chorbadzhiyski http://georgi.unixsol.org/ ...
0
by: Stefano Bonnin | last post by:
Hi, I have a problem with plpgsql and postgres8.0.0beta2 When I execute an insert on "mytable" the psql client returns me the following: **** server closed the connection unexpectedly This...
0
by: Dean N. Williams | last post by:
Dear Python and Mac Community, I have just successfully built gcc version 4.1.0 for my Mac OS X 10.4.6. gcc -v Using built-in specs. Target: powerpc-apple-darwin8.6.0 Configured with:...
2
by: klenghost | last post by:
everytime i try to compile its keeps saying this : unrecognized option `-remap' Invalid argument #include <allegro.h> int main(){
0
by: Levon Haroityoinyan | last post by:
Hello all. I just want to use gcc followed options in my build -feliminate-unused-debug-symbols -felimi- nate-unused-debug-types gcc leads cc1plus: error: unrecognized option I don't...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.