On Fri, 12 Mar 2004 20:50:14 +0000 Paul Warren pdw@ex-parrot.com wrote:
-bash-2.05b$ cc -I/usr/pkg/include -L/usr/pkg/lib -lpthread -g -Wall -o pthread/usr/lib/crt0.o: In function `___start': /usr/lib/crt0.o(.text+0xb8): undefined reference to `main' -bash-2.05b$
Sorry, that should be:
cc -I/usr/pkg/include -L/usr/pkg/lib -lpthread -g -Wall -o pthread pthread.c
OK, now it seems to build:
-bash-2.05b$ cc -I/usr/pkg/include -L/usr/pkg/lib -lpthread -g -Wall -o pthread pthread.c -bash-2.05b$ls -l pthread -rwxr-x--- 1 john wheel 19808 Mar 12 15:02 pthread
I assume there should be some way to tweak the makefile to show it where to look?
On Fri, Mar 12, 2004 at 03:13:57PM -0600, John Thompson wrote:
OK, now it seems to build:
-bash-2.05b$ cc -I/usr/pkg/include -L/usr/pkg/lib -lpthread -g -Wall -o pthread pthread.c -bash-2.05b$ls -l pthread -rwxr-x--- 1 john wheel 19808 Mar 12 15:02 pthread
Hmm, well in that case it should be possible to configure to get the test to compile. At the risk of trying something we've already tried, what happens if you do:
CPPFLAGS=-I/usr/pkg/include && LDFLAGS=-L/usr/pkg/lib && ./configure
Please send the log if it doesn't work.
Paul
On Fri, 12 Mar 2004 22:39:46 +0000 Paul Warren pdw@ex-parrot.com wrote:
On Fri, Mar 12, 2004 at 03:13:57PM -0600, John Thompson wrote:
OK, now it seems to build:
-bash-2.05b$ cc -I/usr/pkg/include -L/usr/pkg/lib -lpthread -g -Wall -o pthread pthread.c -bash-2.05b$ls -l pthread -rwxr-x--- 1 john wheel 19808 Mar 12 15:02 pthread
Hmm, well in that case it should be possible to configure to get the test to compile. At the risk of trying something we've already tried, what happens if you do:
CPPFLAGS=-I/usr/pkg/include && LDFLAGS=-L/usr/pkg/lib && ./configure
Please send the log if it doesn't work.
No joy: checking for pcap.h... yes checking for a curses library containing mvchgat... -lncurses checking how to compile a working program with POSIX threads... no idea configure: error: can't figure out how to compile with POSIX threads If your system actually supports POSIX threads, this means we've messed up.
config.log attached...
On Fri, Mar 12, 2004 at 05:06:34PM -0600, John Thompson wrote:
Hmm, well in that case it should be possible to configure to get the test to compile. At the risk of trying something we've already tried, what happens if you do:
CPPFLAGS=-I/usr/pkg/include && LDFLAGS=-L/usr/pkg/lib && ./configure
Please send the log if it doesn't work.
No joy:
OK, I'm getting pretty confused now. Should the directories in the above example not be /usr/pkg/pthreads/include and /use/pkg/pthreads/lib?
Can you try:
CPPFLAGS=-I/usr/pkg/pthreads/include && LDFLAGS=-L/usr/pkg/pthreads/lib && ./configure
and if that doesn't work:
CFLAGS="-I/usr/pkg/pthreads/include -L/usr/pkg/pthreads/lib" && ./configure
Paul
On Sat, Mar 13, 2004 at 10:36:08AM +0000, Paul Warren wrote:
On Fri, Mar 12, 2004 at 05:06:34PM -0600, John Thompson wrote:
Hmm, well in that case it should be possible to configure to get the test to compile. At the risk of trying something we've already tried, what happens if you do:
CPPFLAGS=-I/usr/pkg/include && LDFLAGS=-L/usr/pkg/lib && ./configure
Please send the log if it doesn't work.
No joy:
OK, I'm getting pretty confused now. Should the directories in the above example not be /usr/pkg/pthreads/include and /use/pkg/pthreads/lib?
Can you try:
CPPFLAGS=-I/usr/pkg/pthreads/include && LDFLAGS=-L/usr/pkg/pthreads/lib && ./configure
and if that doesn't work:
CFLAGS="-I/usr/pkg/pthreads/include -L/usr/pkg/pthreads/lib" && ./configure
don't you need to set CFLAGS and CPPFLAGS?
On Sat, Mar 13, 2004 at 10:56:10AM +0000, Chris Lightfoot wrote:
On Sat, Mar 13, 2004 at 10:36:08AM +0000, Paul Warren wrote:
On Fri, Mar 12, 2004 at 05:06:34PM -0600, John Thompson wrote:
Hmm, well in that case it should be possible to configure to get the test to compile. At the risk of trying something we've already tried, what happens if you do:
CPPFLAGS=-I/usr/pkg/include && LDFLAGS=-L/usr/pkg/lib && ./configure
Please send the log if it doesn't work.
No joy:
OK, I'm getting pretty confused now. Should the directories in the above example not be /usr/pkg/pthreads/include and /use/pkg/pthreads/lib?
Can you try:
CPPFLAGS=-I/usr/pkg/pthreads/include && LDFLAGS=-L/usr/pkg/pthreads/lib && ./configure
and if that doesn't work:
CFLAGS="-I/usr/pkg/pthreads/include -L/usr/pkg/pthreads/lib" && ./configure
don't you need to set CFLAGS and CPPFLAGS?
Why? I thought that CPPFLAGS were for pre-processor (i.e. includes), LDFLAGS for linker flags (-L...) and CFLAGS were included at every CC invocation.
I can't find any documentation of these - the info page for gcc does not list them as environment variables that affect gcc operation...
Paul