3.1 Build error on Solaris 9 w/ Sun CC v5.8

2006-04-26 Thread Mark Reis
 I'm attempting to build a static version of Bash 3.1 on Solaris 9 using
Sun's cc version
5.8 2005/10/13. It fails during make when compiling
  (I'm attempting to install to the /usr/cs directory). Any help would
be appreciated.


make STATIC_LD=  LOCAL_LIBS='-B dynamic -ldl -B static'

  ***
  * *
  * GNU bash, version 3.1.0(1)-release (sparc-sun-solaris2.9)
  * *
  ***

making lib/readline/libreadline.a in ./lib/readline
rm -f complete.o
cc -c -DHAVE_CONFIG_H -DSHELL  -I/usr/cs/include -I. -I/temp/bash-3.1
-I../.. -I../../lib  -g complete.c
"complete.c", line 518: warning: implicit function declaration: access
"complete.c", line 1907: warning: no explicit type given
"complete.c", line 1907: syntax error before or at: *
"complete.c", line 1908: only one storage class allowed
"complete.c", line 1921: undefined symbol: directory
"complete.c", line 1923: warning: implicit function declaration: closedir
"complete.c", line 1924: syntax error before or at: )
"complete.c", line 1983: undefined symbol: directory
"complete.c", line 1983: warning: implicit function declaration: opendir
"complete.c", line 1998: undefined symbol: directory
"complete.c", line 1998: warning: implicit function declaration: readdir
"complete.c", line 1998: warning: improper pointer/integer combination:
op "="
"complete.c", line 2005: undefined struct/union member: d_name
"complete.c", line 2005: cannot dereference non-pointer type
"complete.c", line 2008: undefined struct/union member: d_name
"complete.c", line 2008: cannot dereference non-pointer type
"complete.c", line 2009: improper member use: d_name
"complete.c", line 2009: cannot dereference non-pointer type
"complete.c", line 2010: improper member use: d_name
"complete.c", line 2010: cannot dereference non-pointer type
"complete.c", line 2010: improper member use: d_name
"complete.c", line 2010: cannot dereference non-pointer type
"complete.c", line 2019: undefined struct/union member: d_name
"complete.c", line 2019: cannot dereference non-pointer type
"complete.c", line 2019: improper member use: d_name
"complete.c", line 2019: cannot dereference non-pointer type
"complete.c", line 2019: improper member use: d_name
"complete.c", line 2019: cannot dereference non-pointer type
"complete.c", line 2019: improper member use: d_name
"complete.c", line 2019: cannot dereference non-pointer type
"complete.c", line 2019: improper member use: d_name
"complete.c", line 2019: cannot dereference non-pointer type
"complete.c", line 2020: undefined struct/union member: d_namlen
"complete.c", line 2021: improper member use: d_name
"complete.c", line 2021: warning: improper pointer/integer combination:
arg #2
"complete.c", line 2026: undefined struct/union member: d_name
"complete.c", line 2026: cannot dereference non-pointer type
"complete.c", line 2027: undefined struct/union member: d_namlen
"complete.c", line 2028: improper member use: d_name
"complete.c", line 2028: warning: improper pointer/integer combination:
arg #2
"complete.c", line 2036: undefined symbol: directory
"complete.c", line 2039: syntax error before or at: )
"complete.c", line 2067: undefined struct/union member: d_namlen
"complete.c", line 2080: undefined struct/union member: d_namlen
"complete.c", line 2087: undefined struct/union member: d_name
"complete.c", line 2087: warning: improper pointer/integer combination:
arg #2
"complete.c", line 2090: undefined struct/union member: d_name
"complete.c", line 2090: warning: improper pointer/integer combination:
arg #1
"complete.c", line 2090: improper member use: d_name
"complete.c", line 2090: warning: improper pointer/integer combination:
arg #2
"complete.c", line 2094: cannot recover from previous errors
cc: acomp failed for complete.c
*** Error code 2
make: Fatal error: Command failed for target `complete.o'
Current working directory /temp/bash-3.1/lib/readline
*** Error code 1
make: Fatal error: Command failed for target `lib/readline/libreadline.a'

Sun Compiler Version:
cc -V
cc: Sun C 5.8 2005/10/13

My Configure flags:
CC=cc ./configure --prefix=/usr/cs --enable-static-link --without-afs
--disable-profiling --without-gnu-malloc --with-curses

My path:
export PATH=/opt/SUNWspro/bin:/usr/ccs/bin:/usr/ucb:/usr/bin



___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash


Re: 3.1 Build error on Solaris 9 w/ Sun CC v5.8

2006-04-26 Thread Mark Reis
It appears to be a strange behavior of the configure process.

I wanted to install bash in a non-standard directory "/usr/cs" and
dirent.h is located in /usr/include.

After setting:
export CFLAGS="-I/usr/include"
export CPPFLAGS="-I/usr/include"

I noticed that it insisted on adding:  "-I/usr/cs/include" to the
include statements.  After I removed all of -I/usr/cs/include statements
from the various makefiles, the compile worked.

The one other thing I noticed is that even with --enable-static-link
set, the Makefile still attempted to link to the shared .so libraries
under INTL_LIB and LIBINTL . It was a simple fix to switch them to ".a".

Thanks for the help
-Mark


Chet Ramey wrote:
> Well, the compiler's not finding , that much is clear.
>
> Chet 


___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash


Re: 3.1 Build error on Solaris 9 w/ Sun CC v5.8

2006-04-26 Thread Mark Reis
Oh, I'm not sure if this would be worthy of the build notes - if you
compile in libnsl statically on Solaris 9, bash will segfault when you
try to run it on Solaris 10 with:

# exec bash
ld.so.1: bash: fatal: relocation error: file bash: symbol
_register_forkhandler: referenced symbol not found

If I changed the recommended make statement to:

make STATIC_LD= LOCAL_LIBS='-B dynamic -R/usr/lib -lnsl -ldl -B static'.

It works on both Sol 9 and Sol 10 now.

Cheers,
Mark

Chet Ramey wrote:
> Mark Reis wrote:
>   
>>  I'm attempting to build a static version of Bash 3.1 on Solaris 9 using
>> Sun's cc version
>> 5.8 2005/10/13. It fails during make when compiling
>>   (I'm attempting to install to the /usr/cs directory). Any help would
>> be appreciated.
>> 
>
> Well, the compiler's not finding , that much is clear.
>
> Chet
>   


___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash