Configuration Information [Automatically generated, do not change]:
Machine: sparc
OS: solaris2.4
Compiler: cc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='sparc'
-DCONF_OSTYPE='solaris2.4' -DCONF_MACHTYPE='sparc-sun-solaris2.4'
-DCONF_VENDOR='sun' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash'
-DSHELL -DHAVE_CONFIG_H -DSOLARIS
-I. -I. -I./include -I./lib -I./lib/intl
-I/export/home/klausz/bash-4.3.30/lib/intl -fast -xO5 -xtarget=generic
-xstrconst -xdepend -Xa
uname output: SunOS campus2 5.4 Generic_101945-64 sun4m sparc
Machine Type: sparc-sun-solaris2.4
Bash Version: 4.3
Patch Level: 42
Release Status: release
Description:
when linking bash the following linker error is displayed:
cc -L./builtins -L./lib/readline -L./lib/readline -L./lib/glob...
Undefined first referenced
symbol in file
random ./lib/sh/libsh.a(tmpfile.o)
ld: fatal: Symbol referencing errors. No output written to bash
Solaris 2.4 needs -L/usr/ucblib -lucb to link bash
Repeat-By:
doing nm on all libraries in /usr/lib and looking for random:
nm libucb.so.1 | grep random
[56] | 0| 0|FILE |LOCL |0 |ABS |random.c
[59] | 102956| 4|OBJT |LOCL |0 |17 |__randomjunk
[60] | 14736| 108|FUNC |LOCL |0 |7 |_randomjunk
[61] | 101260| 196|OBJT |LOCL |0 |15 |_randominit
[177] | 14844| 224|FUNC |GLOB |0 |7 |srandom
[241] | 15828| 236|FUNC |GLOB |0 |7 |random <---- here
we are
Fix:
Solaris 2.4 needs -L/usr/ucblib -lucb to link bash,
besides that the Sun WorkShop Compiler C 5.0 does not like c++ style
comments - patch attached.
Greetings
Klaus Ziegler
--- lib/readline/colors.h.orig 2012-09-16 20:25:03.000000000 +0200
+++ lib/readline/colors.h 2015-11-13 20:29:55.000000000 +0100
@@ -27,14 +27,14 @@
#ifndef _COLORS_H_
#define _COLORS_H_
-#include <stdio.h> // size_t
+#include <stdio.h> /* size_t*/
#if defined(__TANDEM) && defined(HAVE_STDBOOL_H) && (__STDC_VERSION__ <
199901L)
typedef int _Bool;
#endif
#if defined (HAVE_STDBOOL_H)
-# include <stdbool.h> // bool
+# include <stdbool.h> /* bool */
#else
typedef int _rl_bool_t;
--- lib/readline/parse-colors.c.orig 2013-12-14 02:05:40.000000000 +0100
+++ lib/readline/parse-colors.c 2015-11-13 20:33:04.000000000 +0100
@@ -32,21 +32,21 @@
#include <stdio.h>
-// strdup() / strcpy()
+/* strdup() / strcpy() */
#if defined (HAVE_STRING_H)
# include <string.h>
#else /* !HAVE_STRING_H */
# include <strings.h>
#endif /* !HAVE_STRING_H */
-// abort()
+/* abort() */
#if defined (HAVE_STDLIB_H)
# include <stdlib.h>
#else
# include "ansi_stdlib.h"
#endif /* HAVE_STDLIB_H */
-#include "rldefs.h" // STREQ, savestring
+#include "rldefs.h" /* STREQ, savestring */
#include "readline.h"
#include "rlprivate.h"
#include "rlshell.h"
@@ -61,30 +61,30 @@
struct bin_str _rl_color_indicator[] =
{
- { LEN_STR_PAIR ("\033[") }, // lc: Left of color sequence
- { LEN_STR_PAIR ("m") }, // rc: Right of color sequence
- { 0, NULL }, // ec: End color (replaces lc+no+rc)
- { LEN_STR_PAIR ("0") }, // rs: Reset to ordinary colors
- { 0, NULL }, // no: Normal
- { 0, NULL }, // fi: File: default
- { LEN_STR_PAIR ("01;34") }, // di: Directory: bright blue
- { LEN_STR_PAIR ("01;36") }, // ln: Symlink: bright cyan
- { LEN_STR_PAIR ("33") }, // pi: Pipe: yellow/brown
- { LEN_STR_PAIR ("01;35") }, // so: Socket: bright magenta
- { LEN_STR_PAIR ("01;33") }, // bd: Block device: bright yellow
- { LEN_STR_PAIR ("01;33") }, // cd: Char device: bright yellow
- { 0, NULL }, // mi: Missing file: undefined
- { 0, NULL }, // or: Orphaned symlink: undefined
- { LEN_STR_PAIR ("01;32") }, // ex: Executable: bright green
- { LEN_STR_PAIR ("01;35") }, // do: Door: bright magenta
- { LEN_STR_PAIR ("37;41") }, // su: setuid: white on red
- { LEN_STR_PAIR ("30;43") }, // sg: setgid: black on yellow
- { LEN_STR_PAIR ("37;44") }, // st: sticky: black on blue
- { LEN_STR_PAIR ("34;42") }, // ow: other-writable: blue on green
- { LEN_STR_PAIR ("30;42") }, // tw: ow w/ sticky: black on green
- { LEN_STR_PAIR ("30;41") }, // ca: black on red
- { 0, NULL }, // mh: disabled by default
- { LEN_STR_PAIR ("\033[K") }, // cl: clear to end of line
+ { LEN_STR_PAIR ("\033[") }, /* lc: Left of color sequence */
+ { LEN_STR_PAIR ("m") }, /* rc: Right of color sequence */
+ { 0, NULL }, /* ec: End color (replaces lc+no+rc)
*/
+ { LEN_STR_PAIR ("0") }, /* rs: Reset to ordinary colors */
+ { 0, NULL }, /* no: Normal */
+ { 0, NULL }, /* fi: File: default */
+ { LEN_STR_PAIR ("01;34") }, /* di: Directory: bright blue */
+ { LEN_STR_PAIR ("01;36") }, /* ln: Symlink: bright cyan */
+ { LEN_STR_PAIR ("33") }, /* pi: Pipe: yellow/brown */
+ { LEN_STR_PAIR ("01;35") }, /* so: Socket: bright magenta */
+ { LEN_STR_PAIR ("01;33") }, /* bd: Block device: bright yellow */
+ { LEN_STR_PAIR ("01;33") }, /* cd: Char device: bright yellow */
+ { 0, NULL }, /* mi: Missing file: undefined */
+ { 0, NULL }, /* or: Orphaned symlink: undefined */
+ { LEN_STR_PAIR ("01;32") }, /* ex: Executable: bright green */
+ { LEN_STR_PAIR ("01;35") }, /* do: Door: bright magenta */
+ { LEN_STR_PAIR ("37;41") }, /* su: setuid: white on red */
+ { LEN_STR_PAIR ("30;43") }, /* sg: setgid: black on yellow */
+ { LEN_STR_PAIR ("37;44") }, /* st: sticky: black on blue */
+ { LEN_STR_PAIR ("34;42") }, /* ow: other-writable: blue on green
*/
+ { LEN_STR_PAIR ("30;42") }, /* tw: ow w/ sticky: black on green */
+ { LEN_STR_PAIR ("30;41") }, /* ca: black on red */
+ { 0, NULL }, /* mh: disabled by default */
+ { LEN_STR_PAIR ("\033[K") }, /* cl: clear to end of line */
};
/* Parse a string as part of the LS_COLORS variable; this may involve