Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Make fails on M1 pro Mac book Pro #84

Open
dejavu1987 opened this issue Mar 31, 2023 · 3 comments
Open

Make fails on M1 pro Mac book Pro #84

dejavu1987 opened this issue Mar 31, 2023 · 3 comments

Comments

@dejavu1987
Copy link

dejavu1987 commented Mar 31, 2023

I am trying to build on M1 mac book pro. I get the following error.

      _spiffs_gc_find_candidate in spiffs_gc.o
      _spiffs_object_append in spiffs_nucleus.o
      _spiffs_object_truncate in spiffs_nucleus.o
  "_mkdir", referenced from:
      dirCreate(char const*) in main.o
  "_opendir$INODE64$UNIX2003", referenced from:
      addFiles(char const*, char const*) in main.o
      dirExists(char const*) in main.o
  "_printf", referenced from:
      _SPIFFS_vis in spiffs_hydrogen.o
  "_putchar", referenced from:
      _SPIFFS_vis in spiffs_hydrogen.o
  "_puts", referenced from:
      _SPIFFS_vis in spiffs_hydrogen.o
  "_readdir$INODE64", referenced from:
      addFiles(char const*, char const*) in main.o
  "_stat$INODE64", referenced from:
      addFiles(char const*, char const*) in main.o
  "_strcmp", referenced from:
      addFiles(char const*, char const*) in main.o
      _spiffs_object_find_object_index_header_by_name_v in spiffs_nucleus.o
      _spiffs_obj_lu_find_free_obj_id_bitmap_v in spiffs_nucleus.o
      _spiffs_obj_lu_find_free_obj_id_compact_v in spiffs_nucleus.o
  "_strlen", referenced from:
      addFile(char*, char const*) in main.o
      addFiles(char const*, char const*) in main.o
      listFiles() in main.o
      unpackFiles(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>) in main.o
      std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>::basic_string[abi:v15006]<std::nullptr_t>(char const*) in main.o
      _SPIFFS_creat in spiffs_hydrogen.o
      _SPIFFS_open in spiffs_hydrogen.o
      ...
  "_strncpy", referenced from:
      _spiffs_stat_pix in spiffs_hydrogen.o
      _spiffs_object_create in spiffs_nucleus.o
      _spiffs_object_update_index_hdr in spiffs_nucleus.o
  "start", referenced from:
     implicit entry/start for main executable
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [mkspiffs] Error 1

GCC version

gcc -v
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin22.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
@new-soul
Copy link

new-soul commented Aug 8, 2023

Me too.
I plan to back to Macbook of intel.

@pawelskr
Copy link

pawelskr commented Aug 9, 2023

A Makefile seems to be outdated.
I used a dirty hack and commented out this section in Makefile and then I managed to build tool without any errors 😄

ifeq ($(TARGET_OS),osx)
	TARGET_CFLAGS   = -mmacosx-version-min=10.7 -arch i386 -arch x86_64
	TARGET_CXXFLAGS = -mmacosx-version-min=10.7 -arch i386 -arch x86_64 -stdlib=libc++
	TARGET_LDFLAGS  = -mmacosx-version-min=10.7 -arch i386 -arch x86_64 -stdlib=libc++
endif
clang --version
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: x86_64-apple-darwin22.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

MacOS Ventura 13.5 (22G74) - intel based

@new-soul
Copy link

ifeq ($(TARGET_OS),osx) TARGET_CFLAGS = -mmacosx-version-min=10.7 -arch x86_64 TARGET_CXXFLAGS = -mmacosx-version-min=10.7 -arch x86_64 -stdlib=libc++ TARGET_LDFLAGS = -mmacosx-version-min=10.7 -arch x86_64 -stdlib=libc++ endif
I remove the '-arch i386' is OK now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants