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

Improve build instructions #706

Merged
merged 1 commit into from
Jan 13, 2022
Merged

Improve build instructions #706

merged 1 commit into from
Jan 13, 2022

Conversation

fstasi
Copy link
Contributor

@fstasi fstasi commented Dec 20, 2021

Improve build instruction based on feedback from the community: https://forum.arduino.cc/t/build-question-about-old-node-module-requested-by-package-json/936228

@fstasi fstasi requested a review from ubidefeo December 20, 2021 10:16
@CptHolzschnauz
Copy link

The goal is a out of the box working build process. I can offer intel and m1 macs to test the yarn building task.
At to moment, on big sur with intel, it fails with

gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/drivelist/src/drivelist.o
  CXX(target) Release/obj.target/drivelist/src/device-descriptor.o
  CXX(target) Release/obj.target/drivelist/src/darwin/list.o
In file included from ../src/darwin/list.mm:21:
In file included from ../src/darwin/REDiskList.h:21:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12:
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:91:143: error: function does not return NSString
- (NSAttributedString *)localizedAttributedStringForKey:(NSString *)key value:(nullable NSString *)value table:(nullable NSString *)tableName NS_FORMAT_ARGUMENT(1) NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0));
                                                         ~~~~~~~~~~~~~~                                                                       ^                  ~
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:103:48: note: expanded from macro 'NS_FORMAT_ARGUMENT'
        #define NS_FORMAT_ARGUMENT(A) __attribute__ ((format_arg(A)))
                                                      ^          ~
1 error generated.
make: *** [Release/obj.target/drivelist/src/darwin/list.o] Error 1

Due to the error text,I would say the build instructions are not comaptible with the newest apple releases (os12 et all)

@fstasi
Copy link
Contributor Author

fstasi commented Dec 20, 2021

The goal is a out of the box working build process. I can offer intel and m1 macs to test the yarn building task. At to moment, on big sur with intel, it fails with

gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/drivelist/src/drivelist.o
  CXX(target) Release/obj.target/drivelist/src/device-descriptor.o
  CXX(target) Release/obj.target/drivelist/src/darwin/list.o
In file included from ../src/darwin/list.mm:21:
In file included from ../src/darwin/REDiskList.h:21:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12:
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:91:143: error: function does not return NSString
- (NSAttributedString *)localizedAttributedStringForKey:(NSString *)key value:(nullable NSString *)value table:(nullable NSString *)tableName NS_FORMAT_ARGUMENT(1) NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0));
                                                         ~~~~~~~~~~~~~~                                                                       ^                  ~
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:103:48: note: expanded from macro 'NS_FORMAT_ARGUMENT'
        #define NS_FORMAT_ARGUMENT(A) __attribute__ ((format_arg(A)))
                                                      ^          ~
1 error generated.
make: *** [Release/obj.target/drivelist/src/darwin/list.o] Error 1

Due to the error text,I would say the build instructions are not comaptible with the newest apple releases (os12 et all)

@CptHolzschnauz the issue is when building drivelist, which relies on node-gyp.

did you get this error while running yarn? can you post the full log?

I also assume you freshly installed the xcode build tools, can you confirm?

@CptHolzschnauz
Copy link

Yes & Yes.

yarn install v1.22.17
[1/5] 🔍  Validating package.json...
[2/5] 🔍  Resolving packages...
[3/5] 🚚  Fetching packages...
[4/5] 🔗  Linking dependencies...
warning "@theia/cli > @theia/application-manager > @theia/compression-webpack-plugin@3.0.0" has incorrect peer dependency "webpack@^4.3.0".
warning "@theia/cli > @theia/application-manager > font-awesome-webpack@0.0.5-beta.2" has unmet peer dependency "font-awesome@>=4.3.0".
warning "@theia/cli > @theia/application-manager > font-awesome-webpack > less-loader@2.2.3" has incorrect peer dependency "less@^2.3.1".
warning "lerna > @lerna/version > @lerna/github-client > @octokit/rest > @octokit/plugin-request-log@1.0.3" has unmet peer dependency "@octokit/core@>=3".
warning "workspace-aggregator-1f0de317-b07a-4561-8b94-65dea42566ce > arduino-ide-extension > @tippyjs/react@4.2.5" has unmet peer dependency "react@>=16.8".
warning "workspace-aggregator-1f0de317-b07a-4561-8b94-65dea42566ce > arduino-ide-extension > @tippyjs/react@4.2.5" has unmet peer dependency "react-dom@>=16.8".
warning "workspace-aggregator-1f0de317-b07a-4561-8b94-65dea42566ce > arduino-ide-extension > react-disable@0.1.0" has unmet peer dependency "react@>=16".
warning "workspace-aggregator-1f0de317-b07a-4561-8b94-65dea42566ce > arduino-ide-extension > react-select@3.2.0" has unmet peer dependency "react@^16.8.0 || ^17.0.0".
warning "workspace-aggregator-1f0de317-b07a-4561-8b94-65dea42566ce > arduino-ide-extension > react-select@3.2.0" has unmet peer dependency "react-dom@^16.8.0 || ^17.0.0".
warning "workspace-aggregator-1f0de317-b07a-4561-8b94-65dea42566ce > arduino-ide-extension > react-tabs@3.2.1" has unmet peer dependency "react@^16.3.0 || ^17.0.0-0".
warning "workspace-aggregator-1f0de317-b07a-4561-8b94-65dea42566ce > arduino-ide-extension > react-window@1.8.6" has unmet peer dependency "react@^15.0.0 || ^16.0.0 || ^17.0.0".
warning "workspace-aggregator-1f0de317-b07a-4561-8b94-65dea42566ce > arduino-ide-extension > react-window@1.8.6" has unmet peer dependency "react-dom@^15.0.0 || ^16.0.0 || ^17.0.0".
warning "workspace-aggregator-1f0de317-b07a-4561-8b94-65dea42566ce > arduino-ide-extension > react-select > @emotion/core@10.1.1" has unmet peer dependency "react@>=16.3.0".
warning "workspace-aggregator-1f0de317-b07a-4561-8b94-65dea42566ce > arduino-ide-extension > react-select > react-input-autosize@3.0.0" has unmet peer dependency "react@^16.3.0 || ^17.0.0".
warning "workspace-aggregator-1f0de317-b07a-4561-8b94-65dea42566ce > arduino-ide-extension > react-select > react-transition-group@4.4.1" has unmet peer dependency "react@>=16.6.0".
warning "workspace-aggregator-1f0de317-b07a-4561-8b94-65dea42566ce > arduino-ide-extension > react-select > react-transition-group@4.4.1" has unmet peer dependency "react-dom@>=16.6.0".
warning "workspace-aggregator-1f0de317-b07a-4561-8b94-65dea42566ce > electron-app > @theia/debug > requestretry@3.1.0" has unmet peer dependency "request@2.*.*".
warning "workspace-aggregator-1f0de317-b07a-4561-8b94-65dea42566ce > electron-app > @theia/messages > react-perfect-scrollbar@1.5.8" has unmet peer dependency "react@>=16.3.3".
warning "workspace-aggregator-1f0de317-b07a-4561-8b94-65dea42566ce > electron-app > @theia/messages > react-perfect-scrollbar@1.5.8" has unmet peer dependency "react-dom@>=16.3.3".
warning "workspace-aggregator-1f0de317-b07a-4561-8b94-65dea42566ce > arduino-ide-extension > @theia/git > @theia/scm > react-autosize-textarea@7.1.0" has unmet peer dependency "react@^0.14.0 || ^15.0.0 || ^16.0.0".
warning "workspace-aggregator-1f0de317-b07a-4561-8b94-65dea42566ce > arduino-ide-extension > @theia/git > @theia/scm > react-autosize-textarea@7.1.0" has unmet peer dependency "react-dom@^0.14.0 || ^15.0.0 || ^16.0.0".
[5/5] 🔨  Building fresh packages...
[1/18] ⠐ puppeteer
[2/18] ⠐ drivelist
[7/18] ⠐ @theia/node-pty
[4/18] ⠐ nsfw
error /Users/probolt/Documents/develop/arduino-ide2/node_modules/drivelist: Command failed.
Exit code: 1
Command: prebuild-install || node-gyp rebuild
Arguments: 
Directory: /Users/probolt/Documents/develop/arduino-ide2/node_modules/drivelist
Output:
prebuild-install WARN install No prebuilt binaries found (target=12.22.7 runtime=node arch=x64 libc= platform=darwin)
gyp info it worked if it ends with ok
gyp info using node-gyp@6.1.0
gyp info using node@12.22.7 | darwin | x64
gyp info find Python using Python version 3.8.2 found at "/Library/Developer/CommandLineTools/usr/bin/python3"
gyp info spawn /Library/Developer/CommandLineTools/usr/bin/python3
gyp info spawn args [
gyp info spawn args   '/Users/probolt/Documents/develop/arduino-ide2/node_modules/electron-rebuild/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/probolt/Documents/develop/arduino-ide2/node_modules/drivelist/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/probolt/Documents/develop/arduino-ide2/node_modules/electron-rebuild/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/probolt/Library/Caches/node-gyp/12.22.7/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/probolt/Library/Caches/node-gyp/12.22.7',
gyp info spawn args   '-Dnode_gyp_dir=/Users/probolt/Documents/develop/arduino-ide2/node_modules/electron-rebuild/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/probolt/Library/Caches/node-gyp/12.22.7/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/probolt/Documents/develop/arduino-ide2/node_modules/drivelist',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/drivelist/src/drivelist.o
  CXX(target) Release/obj.target/drivelist/src/device-descriptor.o
  CXX(target) Release/obj.target/drivelist/src/darwin/list.o
In file included from ../src/darwin/list.mm:21:
In file included from ../src/darwin/REDiskList.h:21:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12:
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:91:143: error: function does not return NSString
- (NSAttributedString *)localizedAttributedStringForKey:(NSString *)key value:(nullable NSString *)value table:(nullable NSString *)tableName NS_FORMAT_ARGUMENT(1) NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0));
                                                         ~~~~~~~~~~~~~~                                                                       ^                  ~
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:103:48: note: expanded from macro 'NS_FORMAT_ARGUMENT'
        #define NS_FORMAT_ARGUMENT(A) __attribute__ ((format_arg(A)))
                                                      ^          ~
1 error generated.
make: *** [Release/obj.target/drivelist/src/darwin/list.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/probolt/Documents/develop/arduino-ide2/node_modules/electron-rebuild/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Darwin 20.6.0
gyp ERR! command "/usr/local/Cellar/node@12/12.22.7/bin/node" "/Users/probolt/Documents/develop/arduino-ide2/node_modules/.bin/node-gyp" "rebuild"
gyp ERR! cwd /Users/probolt/Documents/develop/arduino-ide2/node_modules/drivelist

@per1234 per1234 added the topic: documentation Related to documentation for the project label Dec 20, 2021
@CptHolzschnauz
Copy link

I got the solution! You simply have to upgrade to the newsest os 12 (monterey)!
It's not possible to run mac-os-latest with the xcode cli on 'older' mac os!

@per1234 per1234 added the type: enhancement Proposed improvement label Dec 23, 2021
@fstasi fstasi merged commit 9529e78 into main Jan 13, 2022
@fstasi fstasi deleted the build-instructions branch January 13, 2022 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: documentation Related to documentation for the project type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants