🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nn
7 messages
7 total messages Started by bgeer Sat, 03 Nov 2001 14:36
Need help compiling nn-6.6.2 for Solaris 2.8 w/ gcc 2.95.2
#9912
Author: bgeer
Date: Sat, 03 Nov 2001 14:36
113 lines
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!        ||||    <>
Re: Need help compiling nn-6.6.2 for Solaris 2.8 w/ gcc 2.95.2
#9911
Author: Neil W Rickert
Date: Sat, 03 Nov 2001 15:59
30 lines
2040 bytes
bgeer <bgeer@xmission.xmission.com> writes:

>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".

>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

That sure looks like a broken gcc installation.

Re: Need help compiling nn-6.6.2 for Solaris 2.8 w/ gcc 2.95.2
#9913
Author: bgeer
Date: Mon, 05 Nov 2001 04:24
45 lines
2854 bytes
Neil W Rickert <rickert+nn@cs.niu.edu> writes:

 >bgeer <bgeer@xmission.xmission.com> writes:

 >>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".

 >>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

 >That sure looks like a broken gcc installation.

No doubt that is a possibility.  However, I get the same problems when
compiling on a Sparc5 Solaris 2.8 machine with clean install of gcc
3.0 from http://www.sunfreeware.com/.  In some header files,
va_start() has a single arg & in others it has 2 args.

Hope someone has some gcc/Sparc/Solaris2.8 experience to share.


-- 
<> Robert Geer & Donna Tomky | 	  ||||      We sure       ||||    <>
<>    bgeer@xmission.com     | 	==    ==    find it     ==    ==  <>
<>    dtomky@xmission.com    | 	==    ==   enchanting   ==    ==  <>
<>   Albuquerque, NM  USA    | 	  ||||       here!        ||||    <>
Re: Need help compiling nn-6.6.2 for Solaris 2.8 w/ gcc 2.95.2
#9915
Author: Neil W Rickert
Date: Mon, 05 Nov 2001 06:04
31 lines
2129 bytes
bgeer@xmission.xmission.com (bgeer) writes:
>Neil W Rickert <rickert+nn@cs.niu.edu> writes:
> >bgeer <bgeer@xmission.xmission.com> writes:

> >>...
> >>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

> >That sure looks like a broken gcc installation.

>No doubt that is a possibility.  However, I get the same problems when
>compiling on a Sparc5 Solaris 2.8 machine with clean install of gcc
>3.0 from http://www.sunfreeware.com/.  In some header files,
>va_start() has a single arg & in others it has 2 args.

I suggested that because I have seen similar problems in the past.
gcc needs its own "va_start", which it provides in the header files
it generates with fix-includes.  If not installed properly, you get
the Sun "va_start" instead of the gnu "va_start".

>Hope someone has some gcc/Sparc/Solaris2.8 experience to share.

I compiled nn-6.6.1 on both solaris 7 and solaris 9, using
gcc-2.95.2.  I didn't have the problem you are seeing (or any other
problem for that matter).  I haven't tried 6.6.2, since the
announcement indicated there was no need unless you had a system
where 6.6.1 was broken.

Re: Need help compiling nn-6.6.2 for Solaris 2.8 w/ gcc 2.95.2
#9918
Author: Michael T Pins
Date: Tue, 06 Nov 2001 18:57
59 lines
3435 bytes
bgeer@xmission.xmission.com (bgeer) writes:

>Neil W Rickert <rickert+nn@cs.niu.edu> writes:

> >bgeer <bgeer@xmission.xmission.com> writes:

> >>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".

> >>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

> >That sure looks like a broken gcc installation.

>No doubt that is a possibility.  However, I get the same problems when
>compiling on a Sparc5 Solaris 2.8 machine with clean install of gcc
>3.0 from http://www.sunfreeware.com/.  In some header files,
>va_start() has a single arg & in others it has 2 args.

>Hope someone has some gcc/Sparc/Solaris2.8 experience to share.

I've just reproduced this.  It appears to be a problem with the gcc from Sun.

It compiles (and runs) correctly when I compile it on Solaris 8 using a good
install of gcc-2.8.1 mounted from my Solaris 2.6 machine.
It fails like the above when I try to compile it on the same machine using
the gcc-2.95.3 from Sun.

As I know people who have compiled nn with gcc-2.96, I'm assuming it's not
a problem in gcc itself, but rather one with the install.

Still, this is likely to be an ongoing problem.  I'll look into this next
week as well.

-- 
Michael T Pins			|    "They that can give up essential liberty
mtpins@nndev.org		|    to obtain a little temporary safety
keeper of the nn sources	|    deserve neither liberty nor safety."
ftp://ftp.nndev.org/pub		|	-- Benjamin Franklin, 1759
Re: Need help compiling nn-6.6.2 for Solaris 2.8 w/ gcc 2.95.2
#9917
Author: bgeer
Date: Tue, 06 Nov 2001 18:58
42 lines
2915 bytes
Neil W Rickert <rickert+nn@cs.niu.edu> writes:

 >bgeer@xmission.xmission.com (bgeer) writes:
 >>Neil W Rickert <rickert+nn@cs.niu.edu> writes:
 >> >bgeer <bgeer@xmission.xmission.com> writes:

 >> >>...
 >> >>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

 >> >That sure looks like a broken gcc installation.

 >>No doubt that is a possibility.  However, I get the same problems when
 >>compiling on a Sparc5 Solaris 2.8 machine with clean install of gcc
 >>3.0 from http://www.sunfreeware.com/.  In some header files,
 >>va_start() has a single arg & in others it has 2 args.

Ok, Mr Rickert's recent posting encouraged me to delve further.  Both
Sparcs I've been compiling on have ncurses installed.  The ncurses
header file [also called curses.h] includes stdarg.h; this appears to
be troublesome for the nn compile.

I copied /usr/local/include/[n]curses.h to my nn-6.6.2 subdir, changed
"#include <stdarg.h>" to "#include <varargs.h>", & finally got a
successful compile on the machine I have the most confidence that the
gcc install is "good".  Unfortunately, that machine is behind a
firewall & can't access a newsserver.

The gcc install on the machine on which I *really* want nn to compile,
is "problematic".  I have hopes the sysadmin will install a more
current gcc in hopes it comes out better.

Cheers, Bob

-- 
<> Robert Geer & Donna Tomky | 	  ||||      We sure       ||||    <>
<>    bgeer@xmission.com     | 	==    ==    find it     ==    ==  <>
<>    dtomky@xmission.com    | 	==    ==   enchanting   ==    ==  <>
<>   Albuquerque, NM  USA    | 	  ||||       here!        ||||    <>
Re: Need help compiling nn-6.6.2 for Solaris 2.8 w/ gcc 2.95.2
#9922
Author: bgeer
Date: Wed, 07 Nov 2001 15:16
27 lines
2206 bytes
Michael T Pins <mtpins@nndev.org> writes:

 >I've just reproduced this.  It appears to be a problem with the gcc from Sun.

 >It compiles (and runs) correctly when I compile it on Solaris 8 using a good
 >install of gcc-2.8.1 mounted from my Solaris 2.6 machine.
 >It fails like the above when I try to compile it on the same machine using
 >the gcc-2.95.3 from Sun.

 >As I know people who have compiled nn with gcc-2.96, I'm assuming it's not
 >a problem in gcc itself, but rather one with the install.

 >Still, this is likely to be an ongoing problem.  I'll look into this next
 >week as well.

Much appreciated.

Arghhh...vendor induced travails!  From "evolving" subdir trees to
"migrating" config files, I've just become too expectacious using open
source OSs as much as I do...:-)

-- 
<> Robert Geer & Donna Tomky | 	  ||||      We sure       ||||    <>
<>    bgeer@xmission.com     | 	==    ==    find it     ==    ==  <>
<>    dtomky@xmission.com    | 	==    ==   enchanting   ==    ==  <>
<>   Albuquerque, NM  USA    | 	  ||||       here!        ||||    <>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads