need help from a C programmer

Fernan Aguero fernan at iib.unsam.edu.ar
Thu Dec 15 12:30:03 PST 2005


Mike, 

thanks for your quick reply,

+----[ Michael C. Shultz <ringworm01 at gmail.com> (15.Dec.2005 16:25):
|
| On Thursday 15 December 2005 11:18, Michael C. Shultz wrote:

[...]

| > > [ ... ]
| > > cd hg/pslPretty && gmake
| > > gmake[1]: Entering directory
| > > `/scratch/fernan/ports/blat/work/blatSrc/hg/pslPret ty'
| > > gcc34 -ggdb -o ../../bin/i386/pslPretty pslPretty.o
| > > ../../lib/i386/jkweb.a -lm pslPretty.o: In function `prettyOutString':
| > > pslPretty.o(.text+0x668): undefined reference to `__ctype_b_loc'
| > > pslPretty.o: In function `pslPretty':
| > > pslPretty.o(.text+0x116d): undefined reference to `stdout'
| > > collect2: ld returned 1 exit status
| > > gmake[1]: *** [pslPretty] Error 1
| > >
| > > The authors also are intrigued: "stdout at least is about as
| > > basic and common of a C symbol as you can get. It looks
| > > like pslPretty isn't using ctype directly, but through
| > > isalpha() which is nearly as common as stdout"

[ ... ]

| >
| > For the stdout seems like you aren't linking to libc.
| >
| > -Mike
| Also, does your source have
| 
| #include <stdio.h>
|
| -Mike
|
+----]

[fernan at pi] grep -rH stdio.h .
./work/blatSrc/lib/md5.c:#include <stdio.h>
./work/blatSrc/inc/common.h:#include <stdio.h>
./work/blatSrc/inc/pipeline.h:#include <stdio.h>

and common.h is extensively included by many .c files,
including:
work/blatSrc/hg/pslPretty/pslPretty.c:#include "common.h"

| somewhere? Is the path to stdio.h set?

Mmmm ... where should this be set?

This makes me think that maybe this is a problem with
the makefile in the hg/pslPretty subdirectory. 

Actually, I have problems with all makefiles in
subdirectories ... as an example I had to patch them all to
define BINDIR, even though this variable was defined in
inc/common.mk and this file was included from all
sub-makefiles. Seems like this (lack of proper inclusion of
common.mk) might be the reason of the problem?

Thanks again for your help,

Fernan



More information about the freebsd-ports mailing list