https://github.com/osquery/osquery logo
#core
Title
z

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:
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

gguli

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

zwass

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

gguli

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

zwass

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

gguli

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

zwass

02/01/2019, 6:12 PM
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

gguli

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

zwass

02/01/2019, 6:15 PM
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

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
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

zwass

02/01/2019, 6:24 PM
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

gguli

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

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?
g

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:osqueryd This command succeeds on 10.14.3. Will install cmake osquery and try again
Things still work, after I compiler osquery cmake version 😞
2 Views