Title
#core
zwass

zwass

02/01/2019, 6:09 PM
Now that I removed all of those I no longer get compile errors but I get a linker error:
Undefined symbols for architecture x86_64:
  "google::FlagRegisterer::FlagRegisterer(char const*, char const*, char const*, char const*, void*, void*)", referenced from:
      __GLOBAL__sub_I_kafka_producer.cpp in libkafka_producer.a(kafka_producer.cpp.o)
      __GLOBAL__sub_I_events.cpp in libevents.a(events.cpp.o)
      __GLOBAL__sub_I_event_taps.cpp in libevents.a(event_taps.cpp.o)
      __GLOBAL__sub_I_openbsm.cpp in libevents.a(openbsm.cpp.o)
      __GLOBAL__sub_I_decorators.cpp in libparsers.a(decorators.cpp.o)
      __GLOBAL__sub_I_sql.cpp in libsql.a(sql.cpp.o)
      __GLOBAL__sub_I_sqlite_util.cpp in libsql.a(sqlite_util.cpp.o)
      ...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Parsing buck files: finished in 1.8 sec
Creating action graph: finished in 0.8 sec
Building: finished in 4.4 sec (100%) 208/209 jobs, 1 updated
  Total time: 7.2 sec
Command failed with exit code 1.
stderr: Undefined symbols for architecture x86_64:
  "google::FlagRegisterer::FlagRegisterer(char const*, char const*, char const*, char const*, void*, void*)", referenced from:
      __GLOBAL__sub_I_kafka_producer.cpp in libkafka_producer.a(kafka_producer.cpp.o)
      __GLOBAL__sub_I_events.cpp in libevents.a(events.cpp.o)
      __GLOBAL__sub_I_event_taps.cpp in libevents.a(event_taps.cpp.o)
      __GLOBAL__sub_I_openbsm.cpp in libevents.a(openbsm.cpp.o)
      __GLOBAL__sub_I_decorators.cpp in libparsers.a(decorators.cpp.o)
      __GLOBAL__sub_I_sql.cpp in libsql.a(sql.cpp.o)
      __GLOBAL__sub_I_sqlite_util.cpp in libsql.a(sqlite_util.cpp.o)
      ...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

    When running <c++ link>.
    When building rule //osquery:osqueryd#binary.
gguli

gguli

02/01/2019, 6:10 PM
What's your OS?
zwass

zwass

02/01/2019, 6:10 PM
macos 10.14.3
6:11 PM
From what I can tell, it is trying to build with my system installed libs and not third-party
gguli

gguli

02/01/2019, 6:11 PM
And what does the build command look like?
zwass

zwass

02/01/2019, 6:11 PM
buck build @mode/macos-x86_64/debug //osquery:osqueryd
gguli

gguli

02/01/2019, 6:12 PM
Is it first time you tried buck build or it was recently broken?
zwass

zwass

02/01/2019, 6:12 PM
first time on this computer
6:12 PM
which had an old copy of the osquery repo
6:12 PM
is there some sort of migration that needs to be performed?
gguli

gguli

02/01/2019, 6:13 PM
Not that I'm aware of. Let me look into that
zwass

zwass

02/01/2019, 6:15 PM
Is the build supposed to be self-contained, or rely on dependencies installed on my system?
6:15 PM
I removed the entire osquery repo and re-cloned it because I assumed it was self contained and I might have old artifacts
gguli

gguli

02/01/2019, 6:16 PM
You should definitely not be missing FlagRegisterer . It is in gflags which is provided to buck as dependency
6:21 PM
Problem should not be because of the clean machine. We are always testing build on newly provisioned machines. Will update to 10.14.3 and test build.
zwass

zwass

02/01/2019, 6:24 PM
It's not a clean machine
6:25 PM
I suspect the problem is because the old osquery build had installed some dependencies that are now being picked up by the new build
gguli

gguli

02/01/2019, 7:10 PM
I have not removed Homebrew things since we migrated to buck
zwass

zwass

02/01/2019, 8:31 PM
I am trying to build on the vagrant ubuntu18.04 VM and it is at 85 minutes... I'm guessing it is not going to complete?
gguli

gguli

02/02/2019, 2:08 PM
First build might be slow. Vagrant probably uses 1 core right? Buck loves cores. rm -rf buck-out; buck clean; buck killall; NO_BUCKD=1 buck build @mode/macos-x86_64/debug //osquery😮squeryd This command succeeds on 10.14.3. Will install cmake osquery and try again
2:18 PM
Things still work, after I compiler osquery cmake version 😞