Closed ilzxc closed 3 years ago
hey -- it's been about a year and a half since I looked at this, but I recognize those errors. I just tested and was able to build both the master and linux version on this old debian virtualbox, so I'm tempted think that it could be some other dependencies.
maybe try "apt-get install build-essentials" (if you haven't already) and check the version of clang?
here's the log (you have to make linux twice unfortunately, but for a different error)
rama@debian:~/libo$ clang --version
Debian clang version 3.0-6.2 (tags/RELEASE_30/final) (based on LLVM 3.0)
Target: x86_64-pc-linux-gnu
Thread model: posix
rama@debian:~/libo$ git checkout master
Switched to branch 'master'
rama@debian:~/libo$ git status
# On branch master
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# osc_expr_parser.c
# osc_expr_parser.h
# osc_expr_parser.output
# osc_expr_scanner.c
# osc_expr_scanner.h
# osc_legacy_parser.c
# osc_legacy_parser.h
# osc_legacy_parser.output
# osc_legacy_scanner.c
# osc_legacy_scanner.h
# osc_parser.c
# osc_parser.h
# osc_parser.output
# osc_scanner.c
# osc_scanner.h
nothing added to commit but untracked files present (use "git add" to track)
rama@debian:~/libo$ make clean
rm -f *.o libo.a libo.dylib test/osc_test *~ osc_parser.c osc_expr_parser.c osc_legacy_parser.c osc_parser.h osc_expr_parser.h osc_legacy_parser.h osc_scanner.c osc_expr_scanner.c osc_legacy_scanner.c osc_scanner.h osc_expr_scanner.h osc_legacy_scanner.h *.output
cd doc && rm -rf html latex man
cd test && make clean
make[1]: Entering directory `/home/rama/libo/test'
rm -rf osc_test
make[1]: Leaving directory `/home/rama/libo/test'
cd contrib && rm -rf *.o
rama@debian:~/libo$ make linux
lex -t osc_scanner.l > osc_scanner.c
lex -t osc_expr_scanner.l > osc_expr_scanner.c
lex -t osc_legacy_scanner.l > osc_legacy_scanner.c
bison -p osc_parser_ -d -v --report=itemset -o osc_parser.c osc_parser.y
bison -p osc_expr_parser_ -d -v --report=itemset -o osc_expr_parser.c osc_expr_parser.y
bison -p osc_legacy_parser_ -d -v --report=itemset -o osc_legacy_parser.c osc_legacy_parser.y
clang -std=c99 -fPIC -DLINUX_VERSION -D_XOPEN_SOURCE=500 -c -o osc_match.o osc_match.c
clang -std=c99 -fPIC -DLINUX_VERSION -D_XOPEN_SOURCE=500 -c -o osc_bundle_s.o osc_bundle_s.c
clang -std=c99 -fPIC -DLINUX_VERSION -D_XOPEN_SOURCE=500 -c -o osc_bundle_u.o osc_bundle_u.c
clang -std=c99 -fPIC -DLINUX_VERSION -D_XOPEN_SOURCE=500 -c -o osc_bundle_iterator_s.o osc_bundle_iterator_s.c
clang -std=c99 -fPIC -DLINUX_VERSION -D_XOPEN_SOURCE=500 -c -o osc_bundle_iterator_u.o osc_bundle_iterator_u.c
clang -std=c99 -fPIC -DLINUX_VERSION -D_XOPEN_SOURCE=500 -c -o osc_error.o osc_error.c
clang -std=c99 -fPIC -DLINUX_VERSION -D_XOPEN_SOURCE=500 -c -o osc_mem.o osc_mem.c
clang -std=c99 -fPIC -DLINUX_VERSION -D_XOPEN_SOURCE=500 -c -o osc_message_s.o osc_message_s.c
clang -std=c99 -fPIC -DLINUX_VERSION -D_XOPEN_SOURCE=500 -c -o osc_message_u.o osc_message_u.c
clang -std=c99 -fPIC -DLINUX_VERSION -D_XOPEN_SOURCE=500 -c -o osc_message_iterator_s.o osc_message_iterator_s.c
clang -std=c99 -fPIC -DLINUX_VERSION -D_XOPEN_SOURCE=500 -c -o osc_message_iterator_u.o osc_message_iterator_u.c
clang -std=c99 -fPIC -DLINUX_VERSION -D_XOPEN_SOURCE=500 -c -o osc_atom_s.o osc_atom_s.c
clang -std=c99 -fPIC -DLINUX_VERSION -D_XOPEN_SOURCE=500 -c -o osc_atom_u.o osc_atom_u.c
clang -std=c99 -fPIC -DLINUX_VERSION -D_XOPEN_SOURCE=500 -c -o osc_array.o osc_array.c
clang -std=c99 -fPIC -DLINUX_VERSION -D_XOPEN_SOURCE=500 -c -o osc_atom_array_s.o osc_atom_array_s.c
clang -std=c99 -fPIC -DLINUX_VERSION -D_XOPEN_SOURCE=500 -c -o osc_atom_array_u.o osc_atom_array_u.c
clang -std=c99 -fPIC -DLINUX_VERSION -D_XOPEN_SOURCE=500 -c -o osc_expr.o osc_expr.c
osc_expr.c:58:10: fatal error: 'osc_expr_scanner.h' file not found
#include "osc_expr_scanner.h"
^
1 error generated.
make: *** [osc_expr.o] Error 1
rama@debian:~/libo$ make linux
flex -o osc_scanner.c --prefix=osc_scanner_ --header-file=osc_scanner.h osc_scanner.l
flex -o osc_expr_scanner.c --prefix=osc_expr_scanner_ --header-file=osc_expr_scanner.h osc_expr_scanner.l
flex -o osc_legacy_scanner.c --prefix=osc_legacy_scanner_ --header-file=osc_legacy_scanner.h osc_legacy_scanner.l
clang -std=c99 -fPIC -DLINUX_VERSION -D_XOPEN_SOURCE=500 -c -o osc_expr.o osc_expr.c
osc_expr.c:1831:10: warning: trigraph converted to '#' character [-Wtrigraphs]
st = "??=";
^
1 warning generated.
clang -std=c99 -fPIC -DLINUX_VERSION -D_XOPEN_SOURCE=500 -c -o osc_vtable.o osc_vtable.c
clang -std=c99 -fPIC -DLINUX_VERSION -D_XOPEN_SOURCE=500 -c -o osc_dispatch.o osc_dispatch.c
clang -std=c99 -fPIC -DLINUX_VERSION -D_XOPEN_SOURCE=500 -c -o osc_hashtab.o osc_hashtab.c
clang -std=c99 -fPIC -DLINUX_VERSION -D_XOPEN_SOURCE=500 -c -o osc_linkedlist.o osc_linkedlist.c
clang -std=c99 -fPIC -DLINUX_VERSION -D_XOPEN_SOURCE=500 -c -o osc_util.o osc_util.c
clang -std=c99 -fPIC -DLINUX_VERSION -D_XOPEN_SOURCE=500 -c -o osc_rset.o osc_rset.c
clang -std=c99 -fPIC -DLINUX_VERSION -D_XOPEN_SOURCE=500 -c -o osc_query.o osc_query.c
clang -std=c99 -fPIC -DLINUX_VERSION -D_XOPEN_SOURCE=500 -c -o osc_strfmt.o osc_strfmt.c
clang -std=c99 -fPIC -DLINUX_VERSION -D_XOPEN_SOURCE=500 -c -o osc_expr_rec.o osc_expr_rec.c
clang -std=c99 -fPIC -DLINUX_VERSION -D_XOPEN_SOURCE=500 -c -o osc_typetag.o osc_typetag.c
clang -std=c99 -fPIC -DLINUX_VERSION -D_XOPEN_SOURCE=500 -c -o contrib/strptime.o contrib/strptime.c
clang -std=c99 -fPIC -DLINUX_VERSION -D_XOPEN_SOURCE=500 -c -o osc_timetag.o osc_timetag.c
clang -std=c99 -fPIC -DLINUX_VERSION -D_XOPEN_SOURCE=500 -c -o osc_serial.o osc_serial.c
clang -std=c99 -fPIC -DLINUX_VERSION -D_XOPEN_SOURCE=500 -c -o osc_scanner.o osc_scanner.c
clang -std=c99 -fPIC -DLINUX_VERSION -D_XOPEN_SOURCE=500 -c -o osc_expr_scanner.o osc_expr_scanner.c
clang -std=c99 -fPIC -DLINUX_VERSION -D_XOPEN_SOURCE=500 -c -o osc_legacy_scanner.o osc_legacy_scanner.c
clang -std=c99 -fPIC -DLINUX_VERSION -D_XOPEN_SOURCE=500 -c -o osc_parser.o osc_parser.c
In file included from osc_parser.y:46:
osc_legacy_parser.y:71:9: warning: 'YY_DECL' macro redefined
#define YY_DECL int osc_legacy_scanner_lex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t ...
^
osc_parser.y:77:9: note: previous definition is here
#define YY_DECL int osc_scanner_lex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t ...
^
osc_parser.y:121:12: warning: implicit declaration of function 'osc_parser_parse' is invalid in C99
[-Wimplicit-function-declaration]
int ret = osc_parser_parse(bndl, scanner, &buflen, &buf);
^
2 warnings generated.
clang -std=c99 -fPIC -DLINUX_VERSION -D_XOPEN_SOURCE=500 -c -o osc_expr_parser.o osc_expr_parser.c
osc_expr_parser.y:191:18: warning: implicit declaration of function 'osc_expr_parser_parse' is invalid in C99
[-Wimplicit-function-declaration]
t_osc_err ret = osc_expr_parser_parse(&exprstack, &tmp_exprstack, NULL, scanner, ptr, ...
^
1 warning generated.
clang -std=c99 -fPIC -DLINUX_VERSION -D_XOPEN_SOURCE=500 -c -o osc_legacy_parser.o osc_legacy_parser.c
osc_legacy_parser.y:110:12: warning: implicit declaration of function 'osc_legacy_parser_parse' is invalid in
C99 [-Wimplicit-function-declaration]
int ret = osc_legacy_parser_parse(&bl, &msg, scanner, &buflen, &buf);
^
1 warning generated.
rm -f libo.a
ar cru libo.a osc_match.o osc_bundle_s.o osc_bundle_u.o osc_bundle_iterator_s.o osc_bundle_iterator_u.o osc_error.o osc_mem.o osc_message_s.o osc_message_u.o osc_message_iterator_s.o osc_message_iterator_u.o osc_atom_s.o osc_atom_u.o osc_array.o osc_atom_array_s.o osc_atom_array_u.o osc_expr.o osc_vtable.o osc_dispatch.o osc_hashtab.o osc_linkedlist.o osc_util.o osc_rset.o osc_query.o osc_strfmt.o osc_expr_rec.o osc_typetag.o contrib/strptime.o osc_timetag.o osc_serial.o osc_scanner.o osc_expr_scanner.o osc_legacy_scanner.o osc_parser.o osc_expr_parser.o osc_legacy_parser.o /usr/lib/libfl.a
rama@debian:~/libo$
I looked at the error and uncommented the definition of struct timezone (lines 36 - 39):
struct timezone {
int tz_minuteswest;
int tz_dsttime;
};
No build errors and I didn't have to do the double-build thing that I recall us having to do on linux before. I'm not going to close or submit this until I verify that uncommenting struct timezone doesn't mess things up for OS X and Windows builds (which I'll do after I test the python bindings with swig).
Here's my version numbers for the current build:
ilya@ubuntu:~/code/libo$ sudo apt-get install build-essential
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version (12.1ubuntu2).
0 upgraded, 0 newly installed, 0 to remove and 62 not upgraded.
ilya@ubuntu:~/code/libo$ clang --version
clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
ilya@ubuntu:~/code/libo$ flex --version
flex 2.6.0
ilya@ubuntu:~/code/libo$ bison --version
bison (GNU Bison) 3.0.4
Written by Robert Corbett and Richard Stallman.
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
hey -- yeah, I remember doing the same thing, but I think @maccallum had a reason for commenting that out which I can't remember at all.
Building on linux works now
I'm on
libo-linux
and flex and bison appear to be working correctly: