Article View: news.software.nn
Article #9912Need help compiling nn-6.6.2 for Solaris 2.8 w/ gcc 2.95.2
From: bgeer
Date: Sat, 03 Nov 2001 14:36
Date: Sat, 03 Nov 2001 14:36
113 lines
5024 bytes
5024 bytes
I need some compile help. nn-6.6.2 won't compile after untarring.
"uname -a" reveals "SunOS xmission 5.8 Generic_108528-07 sun4u sparc"
"gcc --version" results in "2.95.2".
I added "-nostdinc -I/usr/include -D__lint" to CFLAGS & it compiles
but segfaults. I've tried a few other things [mostly just thrashing]
with no success. I'd be much obliged for some help.
Here is the result of compiling with no changes other than identifying
the news server & domain in config.h:
gcc -Iconf -D_MSE_INT_H -D__EXTENSIONS__ -g -c -o term.o term.c
In file included from /usr/local/include/stdarg.h:30,
from /usr/local/include/curses.h:78,
from term.c:29:
/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/include/va-sparc.h:29:
warning: `va_start' redefined
/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/include/va-sparc.h:41:
warning: this is the location of the previous definition
term.c:882: macro `va_start' used with just one arg
term.c:1017: macro `va_start' used with just one arg
term.c:1090: macro `va_start' used with just one arg
term.c:2020: macro `va_start' used with just one arg
term.c:2037: macro `va_start' used with just one arg
term.c:2137: macro `va_start' used with just one arg
make[1]: *** [term.o] Error 1
make[1]: Leaving directory `/home/users/b/bgeer/c/nn-6.6.2'
make: *** [all] Error 2
The compile succeeds after adding
"-nostdinc-I/usr/include"
to CFLAGS but the link fails:
linking nn
gcc -o nn -Iconf -D_MSE_INT_H -D__EXTENSIONS__ -g -nostdinc
-I/usr/include nn
.o admin.o proto.o global.o options.o db.o nntp.o init.o variable.o
term.o keyma
p.o macro.o regexp.o menu.o more.o newsrc.o group.o folder.o
dir.o aux.o
sort.o articles.o sequence.o kill.o active.o fullname.o
answer.o rerou
te.o hostname.o save.o unshar.o decode.o execute.o pack_date.o
pack_name.
o pack_subject.o news.o digest.o match.o chset.o awksplit.o hash.o
hdbm.o libno
v.o split.o -lcurses -lsocket -lnsl
Undefined first referenced
symbol in file
__builtin_va_arg_incr global.o
ld: fatal: Symbol referencing errors. No output written to nn
collect2: ld returned 1 exit status
make[1]: *** [nn] Error 1
make[1]: Leaving directory `/home/users/b/bgeer/c/nn-6.6.2'
make: *** [all] Error 2
The compile & link succeeds after adding
"-nostdinc -I/usr/include -D__lint"
to CFLAGS but the executable segfaults:
xmission> gdb ./nn
GNU gdb 5.0
[other greetings & salutations deleted...]
(gdb) r
Starting program: /home/users/b/bgeer/c/nn-6.6.2/./nn
Begin .tcshrc on xmission - Sat Nov 3 07:05:06 MST 2001:
Program received signal SIGSEGV, Segmentation fault.
0xff13303c in strlen () from /usr/lib/libc.so.1
(gdb) bt
#0 0xff13303c in strlen () from /usr/lib/libc.so.1
#1 0xff182890 in _doprnt () from /usr/lib/libc.so.1
#2 0xff184a68 in vsprintf () from /usr/lib/libc.so.1
#3 0x32fdc in vmsg (zZap=0xffbef548) at term.c:2080
#4 0x32e54 in msg (__builtin_va_alist=460952) at term.c:2038
#5 0x23fc0 in connect_server () at nntp.c:587
#6 0x258c4 in nntp_fopen_list (cmd=0x70438 "LIST") at nntp.c:1519
#7 0x21ea8 in readactfile () at db.c:982
#8 0x216d0 in open_master (mode=0) at db.c:526
#9 0x19138 in main (argc=1, argv=0xffbefbd4) at nn.c:881
Putting a breakpoint in vmsg at the line "fmt = va_arg1(char *);" then
stepping shows "fmt" to be:
(gdb) print fmt
$1 = 0x70898 "Connecting to NNTP server %s ..."
(gdb) s
2080 vsprintf(lbuf, fmt, va_args2toN);
(gdb) s
Program received signal SIGSEGV, Segmentation fault.
0xff13303c in strlen () from /usr/lib/libc.so.1
'Bout all I can say is varARRGGGGHHHHHHHH!
--
<> Robert Geer & Donna Tomky | |||| We sure |||| <>
<> bgeer@xmission.com | == == find it == == <>
<> dtomky@xmission.com | == == enchanting == == <>
<> Albuquerque, NM USA | |||| here! |||| <>
Technical Details
Message-ID:
<s4elnfkjjy.fsf@xmission.xmission.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nn.mbox.zip!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!xmission!nnrp.xmission!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <s4elnfkjjy.fsf@xmission.xmission.com> Subject: Need help compiling nn-6.6.2 for Solaris 2.8 w/ gcc 2.95.2 Date: Sat, 03 Nov 2001 14:36:49 +0000 From: bgeer <bgeer@xmission.xmission.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nn.mbox.zip!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!xmission!nnrp.xmission!not-for-mail Newsgroups: news.software.nn Organization: XMission http://www.xmission.com/ Lines: 112 NNTP-Posting-Host: xmission.xmission.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.xmission.com 1004798209 6126 198.60.22.20 (3 Nov 2001 14:36:49 GMT) X-Complaints-To: abuse@xmission.com NNTP-Posting-Date: 3 Nov 2001 14:36:49 GMT User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7