|
|
| Author |
Message |
| 7 new of 13 responses total. |
papa
|
|
response 7 of 13:
|
May 8 11:53 UTC 2018 |
Making a fresh attempt to build bt 1.3.30 on SDF MetaArray.
Why would gcc give a conflicting types error on a function prototype in a .h
file when it is the first appearance of the function in the compilation unit?
The error happens on the prototype for strndup() in str.h included in
builtins.c.
|
cross
|
|
response 8 of 13:
|
May 8 12:16 UTC 2018 |
What's the exact error message?
|
papa
|
|
response 9 of 13:
|
May 8 12:41 UTC 2018 |
In file included from builtin.c:13:
./../incl/str.h:16: error: conflicting types for strndup
|
papa
|
|
response 10 of 13:
|
May 8 14:21 UTC 2018 |
Maybe because strndup is a gcc built-in function.
Trying to build with option -fno-builtin-strndup on gcc.
|
papa
|
|
response 11 of 13:
|
May 8 14:32 UTC 2018 |
... and/or because strndup() is also defined in standard string.h.
Will try renaming the bt version of strndup().
|
papa
|
|
response 12 of 13:
|
May 8 14:56 UTC 2018 |
Renaming strndup() to btstrndup() got bt to build. (Also dropped the
-fno-builtin option.)
Now trying to install bt on my web site.
|
papa
|
|
response 13 of 13:
|
May 8 23:34 UTC 2018 |
I got the install scripts to run, though I had to doctor some of the Makefiles
by hand, so that will need some work.
bt seems to work partially, but the CGI script produces code 500 error pages
for some queries. More later ...
|