grunt-lucas / porytiles

Overworld tileset compiler for Pokémon Generation 3 decompilation projects
MIT License
36 stars 3 forks source link

Error when building from source #71

Open danenders opened 1 week ago

danenders commented 1 week ago

Describe the bug Hello. I've attempted to build from source on two different devices and have received the same error. I am following the steps outlined for building on MacOS.

Error Message received:

In file included from /Users/macbook/porytiles/Porytiles-1.x/lib/src/importer.cpp:8: In member function 'void io::LineReader::set_file_name(const char)', inlined from 'io::LineReader::LineReader(const std::string&)' at /Users/macbook/porytiles/Porytiles-1.x/lib/../vendor/fast-cpp-csv-parser/csv.h:350:18, inlined from 'io::CSVReader<column_count, trim_policy, quote_policy, overflow_policy, comment_policy>::CSVReader(Args&& ...) [with Args = {const std::__cxx11::basic_string<char, std::char_traits, std::allocator >&}; unsigned int column_count = 4; trim_policy = io::trim_chars<' ', '\011'>; quote_policy = io::no_quote_escape<','>; overflow_policy = io::throw_on_overflow; comment_policy = io::no_comment]' at /Users/macbook/porytiles/Porytiles-1.x/lib/../vendor/fast-cpp-csv-parser/csv.h:1077:41: /Users/macbook/porytiles/Porytiles-1.x/lib/../vendor/fast-cpp-csv-parser/csv.h:410:14: error: 'char strncpy(char, const char, size_t)' specified bound 1025 equals destination size [-Werror=stringop-truncation] 410 | strncpy(this->file_name, file_name, sizeof(this->file_name)); | ~^~~~~~~~~~~ cc1plus: all warnings being treated as errors gmake[2]: [Porytiles-1.x/lib/CMakeFiles/Porytiles1xLib.dir/build.make:163: Porytiles-1.x/lib/CMakeFiles/Porytiles1xLib.dir/src/importer.cpp.o] Error 1 gmake[1]: [CMakeFiles/Makefile2:347: Porytiles-1.x/lib/CMakeFiles/Porytiles1xLib.dir/all] Error 2 gmake: *** [Makefile:146: all] Error 2

Screen Shot 2024-11-11 at 9 38 59 AM Environment (please complete the following information): OS: MacOS Mojave, 10.14.6 Compiler: gcc 14.2.0_1

grunt-lucas commented 1 week ago

@danenders quick question: are you on an intel mac? What's the full output you see when you run uname -a? I ask because I am unable to reproduce this on my end. Granted I'm also running Sonoma.

danenders commented 1 week ago

Yeah, I am! Darwin Kernel Version 18.7.0: Tue Aug 20 16:57:14 PDT 2019; root:xnu-4903.271.2~2/RELEASE_X86_64 x86_64

All good if my janky computer is just too old to run this, but figured I'd flag the build error just in case it wasn't that!

grunt-lucas commented 5 days ago

@danenders no worries, I have a feeling it's something to do with that. I had someone else on Intel mac run into some trouble as well. Unfortunately I don't really have a good way to reproduce. Although I'd suggest installing/trying Clang 16 and see if that helps. If you have homebrew you should be able to do:

brew install llvm@16

to get that version specifically

danenders commented 5 days ago

Looks like that can't install either, homebrew fails during the install / patch process, part of the info provided cites my system being unsupported.

Seems like this is an issue with my setup being jank, think we can close this. Thanks for checking though, and even if I can't use this Porytiles sounds cool as hell, awesome work.

grunt-lucas commented 4 days ago

@danenders Just as a longshot, your GCC output seems to be failing due to a warning that's getting enabled as an error. Can you try:

CXX=g++-14 CXXFLAGS=-Wno-error=stringop-truncation cmake -B build

Seems like the default CMake configuration treats all warnings as errors. I suspect this is an issue that won't break the app so let's just disable it.