Now that I removed all of those I no longer get co...
# core
z
Now that I removed all of those I no longer get compile errors but I get a linker error:
Copy code
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.
g
What's your OS?
z
macos 10.14.3
From what I can tell, it is trying to build with my system installed libs and not third-party
g
And what does the build command look like?
z
buck build @mode/macos-x86_64/debug //osquery:osqueryd
g
Is it first time you tried buck build or it was recently broken?
z
first time on this computer
which had an old copy of the osquery repo
is there some sort of migration that needs to be performed?
g
Not that I'm aware of. Let me look into that
z
Is the build supposed to be self-contained, or rely on dependencies installed on my system?
I removed the entire osquery repo and re-cloned it because I assumed it was self contained and I might have old artifacts
g
You should definitely not be missing FlagRegisterer . It is in gflags which is provided to buck as dependency
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.
z
It's not a clean machine
I suspect the problem is because the old osquery build had installed some dependencies that are now being picked up by the new build
g
I have not removed Homebrew things since we migrated to buck
z
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?
g
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:osqueryd This command succeeds on 10.14.3. Will install cmake osquery and try again
Things still work, after I compiler osquery cmake version 😞