Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix FreeBSD build error: "Cannot find source file: plat/plat/default/debugging.cpp" #3158

Merged
merged 1 commit into from
Apr 7, 2021

Conversation

mistakia
Copy link
Contributor

cmake on FreeBSD gives an error. I believe it's a typo in the CMakeLists.txt file:

elseif(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
  set(platform_sources
      plat/default/priority.cpp plat/posix/perms.cpp
      plat/freebsd/thread_role.cpp plat/plat/default/debugging.cpp)
else()

Steps to reproduce the issue:

$ cmake .
Generating flatbuffers code for: nanoapi into /root/nano-node/nano/ipc_flatbuffers_lib/generated/flatbuffers
CryptoPP with disabled ASM for Clang 10.0.0
-- Configuring done
CMake Error at nano/lib/CMakeLists.txt:13 (add_library):
  Cannot find source file:

    plat/plat/default/debugging.cpp

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .ispc


CMake Error at nano/lib/CMakeLists.txt:13 (add_library):
  No SOURCES given to target: nano_lib


CMake Generate step failed.  Build files cannot be regenerated correctly.

Environment:

FreeBSD nanojail 11.2-STABLE FreeBSD 11.2-STABLE #0 r325575+4710c8b6420(HEAD): Fri Feb 14 13:59:19 UTC 2020     root@tnbuild02.tn.ixsystems.com:/freenas-releng/freenas/_BE/objs/freenas-releng/freenas/_BE/os/sys/FreeNAS.amd64  amd64

@mistakia
Copy link
Contributor Author

mistakia commented Mar 19, 2021

I'm still struggling to compile on FreeBSD for other reasons, one of them being _Unwind_Backtrace availability on FreeBSD. When I have some time, I'll dig into it further — but judging by how long this typo has gone unnoticed, perhaps FreeBSD support should be dropped all together. It can be a pain and nobody seems to be relying on it

@mistakia
Copy link
Contributor Author

mistakia commented Mar 27, 2021

Following up. I was able to successfully build and run it on FreeBSD.

In case others are interested, I had to get around _Unwind_Backtrace by linking -lexecinfo and remove -Werror in nano/ipc_flatbuffers_lib/flatbuffers-build/CMakeFiles/flatc.dir/link.txt

If there's interest, I can do some more digging and follow up with a PR to address it in the make files.

Edit: it's running exceptionally well! 🙌

@zhyatt zhyatt requested a review from argakiig March 30, 2021 14:35
@zhyatt zhyatt added the bug label Mar 30, 2021
@zhyatt zhyatt added this to the V22.0 milestone Mar 30, 2021
@clemahieu clemahieu merged commit 9c4851d into nanocurrency:develop Apr 7, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants