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

MacOS error #42

Open
Matyu9 opened this issue Dec 31, 2023 · 6 comments
Open

MacOS error #42

Matyu9 opened this issue Dec 31, 2023 · 6 comments

Comments

@Matyu9
Copy link

Matyu9 commented Dec 31, 2023

Hello!
I tried to build Tess on macOS Sonoma (beta v14.3) when this issue comes when I tried to execute: npm i

npm ERR! code 1
npm ERR! path /Users/matyu/Tess/node_modules/node-pty
npm ERR! command failed
npm ERR! command sh -c node scripts/install.js
npm ERR! CXX(target) Release/obj.target/pty/src/unix/pty.o
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | arm64
npm ERR! gyp info find Python using Python version 3.9.6 found at "/Applications/Xcode.app/Contents/Developer/usr/bin/python3"
npm ERR! gyp info spawn /Applications/Xcode.app/Contents/Developer/usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/Users/matyu/Tess/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/matyu/Tess/node_modules/node-pty/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/matyu/Tess/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/matyu/Library/Caches/node-gyp/20.10.0/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/Users/matyu/Library/Caches/node-gyp/20.10.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/Users/matyu/Tess/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/matyu/Library/Caches/node-gyp/20.10.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/matyu/Tess/node_modules/node-pty',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! In file included from ../src/unix/pty.cc:20:
npm ERR! In file included from ../../nan/nan.h:180:
npm ERR! ../../nan/nan_callbacks.h:55:23: error: no member named 'AccessorSignature' in namespace 'v8'
npm ERR! typedef v8::Local<v8::AccessorSignature> Sig;
npm ERR!                   ~~~~^
npm ERR! In file included from ../src/unix/pty.cc:20:
npm ERR! ../../nan/nan.h:686:39: warning: 'IdleNotificationDeadline' is deprecated: Use MemoryPressureNotification() to influence the GC schedule. [-Wdeprecated-declarations]
npm ERR!     return v8::Isolate::GetCurrent()->IdleNotificationDeadline(
npm ERR!                                       ^
npm ERR! /Users/matyu/Library/Caches/node-gyp/20.10.0/include/node/v8-isolate.h:1291:3: note: 'IdleNotificationDeadline' has been explicitly marked deprecated here
npm ERR!   V8_DEPRECATE_SOON(
npm ERR!   ^
npm ERR! /Users/matyu/Library/Caches/node-gyp/20.10.0/include/node/v8config.h:550:39: note: expanded from macro 'V8_DEPRECATE_SOON'
npm ERR! # define V8_DEPRECATE_SOON(message) [[deprecated(message)]]
npm ERR!                                       ^
npm ERR! 1 warning and 1 error generated.
npm ERR! make: *** [Release/obj.target/pty/src/unix/pty.o] Error 1
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/Users/matyu/Tess/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:514:28)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:294:12)
npm ERR! gyp ERR! System Darwin 23.3.0
npm ERR! gyp ERR! command "/usr/local/bin/node" "/Users/matyu/Tess/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /Users/matyu/Tess/node_modules/node-pty
npm ERR! gyp ERR! node -v v20.10.0
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ```
@SquitchYT
Copy link
Owner

Hello @Matyu9!
Firstly, Tess is not currently supported on macOS. More importantly, you seem to be trying to compile the version 0.6.3, which will be deprecated as soon as the rewrite on the dev branch is complete.

However, the issue you encounter occurred sometime on Windows and can be fixed by reinstalling Node.js or by renaming some files. On Windows, the problem was files that had an incorrect suffix appended to them, causing the compiler to not find them.

If you are still interested in having Tess on your Mac, you should try to manually compile the new version by following this guide and changing the last command from cargo tauri dev by cargo tauri build, but as the macOS support is not yet available, some issues may occur.

@Matyu9
Copy link
Author

Matyu9 commented Jan 4, 2024

Hello @SquitchYT !
Thanks for your answer!

I just tried to compile with the dev branch. But a new issue occurred. Did I need to open a new issue or I send the error here?

Thanks fully
Matyu

@SquitchYT
Copy link
Owner

Hello!
You can post the error here. As the version running with electron will not get any new updates, I'll track macOS support here.

@Matyu9
Copy link
Author

Matyu9 commented Feb 11, 2024

error: failed to run custom build command for libproc v0.12.0
Caused by:
  process didn't exit successfully: /Users/matyu/Tess/src-tauri/target/debug/build/libproc-756f9cbc7f4b03d4/build-script-build (exit status: 101)
  --- stderr
  thread 'main' panicked at /Users/matyu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.69/src/fallback.rs:817:9:
  "mach_port_options_union_(anonymous_at_/Applications/Xcode_app/Contents/Developer/Platforms/MacOSX_platform/Developer/SDKs/MacOSX_sdk/usr/include/mach/port_h_381_2)" is not a valid Ident
  note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish... 

This error occurred when the command cargo tauri dev run
Sorry for the late 🫢

@SquitchYT
Copy link
Owner

Hello, it seems like this issue occurred because a lib used by one of our dependencies cannot be built. However, with the recent code refactor, we have removed this dependency.

Can you try running git pull and try again?

I'm pretty sure that Tess will still not compile, but it will be due to others issues that we can try to fix next.

@Matyu9
Copy link
Author

Matyu9 commented Feb 11, 2024

Hello,
I just git pull and that is the result:

   Compiling tess v0.7.0-alpha.5 (/Users/matyu/Tess/src-tauri)
warning: field `theme` is never read
  --> src/configuration/deserialized.rs:26:5
   |
12 | pub struct Option {
   |            ------ field in this struct
...
26 |     theme: String,
   |     ^^^^^
   |
   = note: `Option` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
   = note: `#[warn(dead_code)]` on by default

warning: `tess` (lib) generated 1 warning
    Finished dev [unoptimized + debuginfo] target(s) in 9.58s
The window is set to be transparent but the `macos-private-api` is not enabled.
        This can be enabled via the `tauri.macOSPrivateApi` configuration property <https://tauri.app/docs/api/config#tauri.macOSPrivateApi>
      
[INFO] Launched in 225ms.
RemoteLayerTreeDrawingAreaProxyMac::scheduleDisplayLink(): page has no displayID
RemoteLayerTreeDrawingAreaProxyMac::scheduleDisplayLink(): page has no displayID

This windows open just after this lines was wrote on my terminal
Screenshot 2024-02-11 at 11 06 58

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

2 participants