1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
|
Solaris build error: Bad string
While building qemu2.12.0 on a Sun Oracle Enterprise M3000 SPARC64 VII running Solaris 10U11, opencsw toolchain, gcc 7.3.0, and python 3.3.6 I get:
# gmake
mkdir -p dtc/libfdt
mkdir -p dtc/tests
Bad string
DEP /export/home/denber/qemu-2.12.0/dtc/tests/dumptrees.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/trees.S
DEP /export/home/denber/qemu-2.12.0/dtc/tests/testutils.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/value-labels.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/asm_tree_dump.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/truncated_property.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/check_path.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/overlay_bad_fixup.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/overlay.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/subnode_iterate.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/property_iterate.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/integer-expressions.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/utilfdt_test.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/path_offset_aliases.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/add_subnode_with_nops.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/dtbs_equal_unordered.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/dtb_reverse.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/dtbs_equal_ordered.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/extra-terminating-null.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/incbin.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/boot-cpuid.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/phandle_format.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/path-references.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/references.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/string_escapes.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/propname_escapes.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/appendprop2.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/appendprop1.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/del_node.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/del_property.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/setprop.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/set_name.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/rw_tree1.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/open_pack.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/nopulate.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/mangle-layout.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/move_and_save.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/sw_tree1.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/nop_node.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/nop_property.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/setprop_inplace.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/stringlist.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/addr_size_cells.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/notfound.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/sized_cells.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/char_literal.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/get_alias.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/node_offset_by_compatible.c DEP /export/home/denber/qemu-2.12.0/dtc/tests/node_check_compatible.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/node_offset_by_phandle.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/node_offset_by_prop_value.c DEP /export/home/denber/qemu-2.12.0/dtc/tests/parent_offset.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/supernode_atdepth_offset.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/get_path.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/get_phandle.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/getprop.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/get_name.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/path_offset.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/subnode_offset.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/find_property.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/root_node.c
DEP /export/home/denber/qemu-2.12.0/dtc/tests/get_mem_rsv.c
DEP /export/home/denber/qemu-2.12.0/dtc/libfdt/fdt_overlay.c
DEP /export/home/denber/qemu-2.12.0/dtc/libfdt/fdt_addresses.c
DEP /export/home/denber/qemu-2.12.0/dtc/libfdt/fdt_empty_tree.c
DEP /export/home/denber/qemu-2.12.0/dtc/libfdt/fdt_strerror.c
DEP /export/home/denber/qemu-2.12.0/dtc/libfdt/fdt_rw.c
DEP /export/home/denber/qemu-2.12.0/dtc/libfdt/fdt_sw.c
DEP /export/home/denber/qemu-2.12.0/dtc/libfdt/fdt_wip.c
DEP /export/home/denber/qemu-2.12.0/dtc/libfdt/fdt_ro.c
DEP /export/home/denber/qemu-2.12.0/dtc/libfdt/fdt.c
DEP /export/home/denber/qemu-2.12.0/dtc/util.c
DEP /export/home/denber/qemu-2.12.0/dtc/fdtoverlay.c
DEP /export/home/denber/qemu-2.12.0/dtc/fdtput.c
DEP /export/home/denber/qemu-2.12.0/dtc/fdtget.c
DEP /export/home/denber/qemu-2.12.0/dtc/fdtdump.c
DEP convert-dtsv0-lexer.lex.c
DEP /export/home/denber/qemu-2.12.0/dtc/srcpos.c
DEP dtc-parser.tab.c
DEP dtc-lexer.lex.c
DEP /export/home/denber/qemu-2.12.0/dtc/treesource.c
DEP /export/home/denber/qemu-2.12.0/dtc/livetree.c
DEP /export/home/denber/qemu-2.12.0/dtc/fstree.c
DEP /export/home/denber/qemu-2.12.0/dtc/flattree.c
DEP /export/home/denber/qemu-2.12.0/dtc/dtc.c
DEP /export/home/denber/qemu-2.12.0/dtc/data.c
DEP /export/home/denber/qemu-2.12.0/dtc/checks.c
Bad string
CC libfdt/fdt.o
CC libfdt/fdt_ro.o
CC libfdt/fdt_wip.o
CC libfdt/fdt_sw.o
CC libfdt/fdt_rw.o
CC libfdt/fdt_strerror.o
CC libfdt/fdt_empty_tree.o
CC libfdt/fdt_addresses.o
CC libfdt/fdt_overlay.o
AR libfdt/libfdt.a
a - libfdt/fdt.o
a - libfdt/fdt_ro.o
a - libfdt/fdt_wip.o
a - libfdt/fdt_sw.o
a - libfdt/fdt_rw.o
a - libfdt/fdt_strerror.o
a - libfdt/fdt_empty_tree.o
a - libfdt/fdt_addresses.o
a - libfdt/fdt_overlay.o
ar: creating libfdt/libfdt.a
ar: writing libfdt/libfdt.a
...
gmake then completes, returning just a "#" prompt and no error messages. However, no executable is created. Apparently, "Bad string" is the problem, but it is unclear what that means and where the two instances of it are coming from. A web search for this problem returned nothing.
[Solved]
There's nothing like going public with a problem to find the answer yourself shortly after. In case it helps someone else in the future, it turns out that the Makefile in dtc/ contains the following line:
HOSTOS := $(shell uname -s | tr '[:upper:]' '[:lower:]' | \
sed -e 's/\(cygwin\|msys\).*/\1/')
Apparently there's something in there that gmake doesn't like which causes it to emit "Bad string" so I just replaced that line with:
HOSTOS=SunOS
(a call to uname -s from the command line returns SunOS) and I'm no longer getting the "Bad string" from gmake. (I'm getting soemthing else now but that's a different matter).
Oh, and how I found this. From http://lists.xymon.com/archive/2012-July/035109.html:
> Sorry to reply to myself. Looks like this line:
>
> uname -s | tr '[/]' '[_]'
>
> ...is not acceptable to /usr/bin/tr on Solaris 10. It worked fine
> on 9. On 10, one receives this error:
>
> # uname -s | tr '[/]' '[_]' Bad string
And indeed I get:
# uname -s | tr '[/]' '[_]'
Bad string
#
So this is a bug in the Makefile, but only for Solaris 10.
It sounds more like a bug / limited featureset in the Solaris 'tr' binary.
What is your $PATH ? Make sure /usr/xpg4/bin directory appears *before* /usr/bin in $PATH to get a more functional version of 'tr', though I'm not sure if that'll fix it or not.
You are absolutely correct. I found the right problem but the wrong reason. Note that:
# which tr
/usr/bin/tr
# uname -s | tr '[/]' '[_]'
Bad string
# uname -s | /usr/xpg4/bin/tr '[/]' '[_]'
SunOS
#
So it's just another POSIX problem with Solaris, not a bug. Solaris provides all the POSIX stuff, it just doesn't make it the default.
|