Closed smerkousdavid closed 7 years ago
This happens because of the new string implementation in GCC 5 and above. The reason that error is happening is because it is attempting to get wpiutil from our server, which is built with GCC 4. The solution to this is to run a full publish build of ntcore, which will build wpiutil in a way that cscore can see it. cscore build should then work.
Sorry, but I'm having the same issue. Could you please explain in greater detail how this could be solved?? Iḿ kind of new to all of this and I didn't understand completely how to fix this.
Clone the ntcore repository, run ./gradlew -PmakeDesktop publish
on it, and then try building cscore.
Note you will likely run into issues linking with the NI libraries as well if you're targeting the roboRio. The NI libraries are built against the 4.X ABI.
I'm just building it for native, but it still wont compile after doing the full publish build on ntcore.
See file:///home/alberto/Documents/cscore/native/build/tmp/linkEnum_usbExecutable/output.txt for all output for linkEnum_usbExecutable.
linking enum_usb failed.
/home/alberto/Documents/cscore/native/build/libs/cscore/static/libcscore.a(HttpUtil.o): In function `cs::HttpRequest::SetAuth(cs::HttpLocation const&)':
/home/alberto/Documents/cscore/src/HttpUtil.cpp:305: undefined reference to `wpi::Base64Encode(llvm::StringRef, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
collect2: error: ld returned 1 exit status
Finished linkEnum_usbExecutable, see full log file:///home/alberto/Documents/cscore/native/build/tmp/linkEnum_usbExecutable/output.txt.
Nevermind, I cloned the cscore repository again and Gradlew managed to build it :D
We've migrated to all 5.x compilers (including the roborio) for 2018, so this should no longer be an issue.
Hello, I've successfully crossed compiled gcc 6.3.0 and its relative binutils, gdb and sysroot for the roborio (This version upgrade isn't necessary but I perceive it to be a greater issue). Everything works fine until I attempt to compile cscore (As being in conjunction with allwpilib). I get a undefined reference error (see below) to a function in HttpUtil.cpp. I was receiving the same error for a native build (Using gcc 6.2.0). I am curious to hear back from you guys. I don't know the code layout and am wondering if there is a version check define somewhere where the preprocessor removes those functions -- Or this could just an absurd single instanced error... :neutral_face:
Regards, David Smerkous