Closed borntohonk closed 6 years ago
Are you sure you're using the latest version that comes with devkitpro? I've just updated my whole devkit and libnx and everything still works and compiles as it did before. You might also be missing some other dependencies... We're making an Q&A right now that will have a guide for compilation in it so you might want to wait for that
Latest everything, on linux. So yeah. Have had no issues building prior to these getting updated. Even hbmenu seems to be affected.
@borntohonk Before we used a special version of libnx that fixed the issues with sockets. Have you tried to delete libnx and recloning and building it manually? Maybe something went wrong during the update
https://devkitpro.org/viewtopic.php?f=13&t=8751
I'm more or less sure it's devkitA64's fault
base rules
@echo $(notdir $@)
@rm -f $@
$(AR) -rc $@ $^
#---------------------------------------------------------------------------------
%.o: %.cpp
@echo $(notdir $<)
$(CXX) -MMD -MP -MF $(DEPSDIR)/$*.d $(CXXFLAGS) -c $< -o $@ $(ERROR_FILTER)
make file
all: $(BUILD)
$(BUILD):
@[ -d $@ ] || mkdir -p $@ $(BUILD) $(OUTDIR)
@$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
I did a clean install of ubuntu and set up the toolchain again, and the issue persists. Can't build hbmenu or edizon.
It definitively is devkitA64 11.1 causing this. @WinterMute
looks to me like you're missing a header. I'll have a look in a bit
Yep. Missing headers.
You also have things in the Makefile that shouldn't be there.
davem@ashpool MSYS ~/projects/switch/test/EdiZon
$ git diff
diff --git a/Makefile b/Makefile
index aac0539..5aaecca 100644
--- a/Makefile
+++ b/Makefile
@@ -58,14 +58,14 @@ CFLAGS := -g -Wall -O3 -ffunction-sections \
-DVERSION_MINOR=${VERSION_MINOR} \
-DVERSION_MICRO=${VERSION_MICRO}
-CFLAGS += $(INCLUDE) -D__SWITCH__ -I$(DEVKITPRO)/libnx/external/bsd/include
+CFLAGS += $(INCLUDE) -D__SWITCH__
CXXFLAGS := $(CFLAGS) -fno-rtti -fexceptions -std=gnu++17
ASFLAGS := -g $(ARCH)
-LDFLAGS = -specs=$(DEVKITPRO)/libnx/switch.specs -g $(ARCH) -Wl,-no-as-needed,-Map,$(notdir $*.map)
+LDFLAGS = -specs=$(DEVKITPRO)/libnx/switch.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
-LIBS := -lnx -lcurl -lz
+LIBS := -lcurl -lz -lnx
#---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing
diff --git a/source/save.cpp b/source/save.cpp
index 37338b1..fa7bc0d 100644
--- a/source/save.cpp
+++ b/source/save.cpp
@@ -1,5 +1,7 @@
#include "save.hpp"
+#include <sys/types.h>
+#include <sys/stat.h>
#include <unistd.h>
#include "account.hpp"
@WinterMute Are you saying we have something in our make file that shouldn't be there or are you talking to @borntohonk now?
@WerWolv98 I attached a patch which fixes the Makefile as well as the build error.
$(DEVKITPRO)/libnx/external/bsd/include shouldn't exist never mind be part of your include paths. If this path exists then remove your libnx folder and reinstall latest libnx using pacman.
-Wl,-no-as-needed serves no purpose at all in this environment.
Generally -lnx should be last in the libs. This project will fail to link when we update curl in the future. Probably best to fix it now so nobody is blaming the tools for the failure.
@WinterMute Thanks. I updated libnx but didn't delete the old libnx folder. Still, I'm using the latest devkit and now the latest libnx and have no issues with building. If the folder I explicitly included there doesn't exist it should just get ignored IIRC so I can't really see why you're having problems with building @borntohonk
I'm not having problems building. I fixed your project & provided a patch and offered advice on how to avoid potential problems.
The issue I have is that the folder you explicitly included is a folder from the source tree which should not be in the install location. If that folder does exist then it's likely to break in future iterations of the tools and libraries.
The fact that you have that include path in the Makefile implies that the folder should exist there and is likely to lead others to improperly install libnx and end up with broken tools.
Please remove it before it causes problems.
@WerWolv98 also, you can't possibly be using the latest devkitA64 with this tree. It fails to build without the patch I supplied at https://github.com/thomasnet-mc/EdiZon/issues/10#issuecomment-404863255