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

error[E0425]: cannot find function build_native in this scope #1495

Open
yurivict opened this issue Jan 3, 2023 · 7 comments
Open

error[E0425]: cannot find function build_native in this scope #1495

yurivict opened this issue Jan 3, 2023 · 7 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@yurivict
Copy link

yurivict commented Jan 3, 2023

Describe the bug

rror[E0425]: cannot find function `build_native` in this scope
   --> espanso-modulo/build.rs:501:3
    |
501 |   build_native();
    |   ^^^^^^^^^^^^ not found in this scope

For more information about this error, try `rustc --explain E0425`.
warning: `espanso-modulo` (build script) generated 1 warning
error: could not compile `espanso-modulo` due to previous error; 1 warning emitted

Setup information

  • OS: FreeBSD 13.1
  • Version: 2.1.8
  • rust-1.66.0
@yurivict yurivict added the bug Something isn't working label Jan 3, 2023
@smeech
Copy link
Collaborator

smeech commented Feb 17, 2024

Is this still a problem with the current release? I realise it's been a while since you posted this.

@yurivict
Copy link
Author

The current release has the same problem:

error[E0425]: cannot find function `build_native` in this scope
   --> espanso-modulo/build.rs:496:3
    |
496 |   build_native();
    |   ^^^^^^^^^^^^ not found in this scope

For more information about this error, try `rustc --explain E0425`.
warning: `espanso-modulo` (build script) generated 1 warning
error: could not compile `espanso-modulo` (build script) due to previous error; 1 warning emitted

Is this function only defined for some OSes and not others?

@yurivict
Copy link
Author

Yes, this is the problem.

@smeech
Copy link
Collaborator

smeech commented Feb 17, 2024

There are entries in the code for Windows, macOS and Linux. Presumably FreeBSD isn't being identified as one of those. There's no mention of "freebsd" in the code so I suspect Espanso hasn't been written for that platform.

@yurivict
Copy link
Author

Patches like this should be applied:

--- espanso-ui/build.rs.orig    2024-02-17 19:32:18 UTC
+++ espanso-ui/build.rs
@@ -39,7 +39,7 @@ fn cc_config() {
   }
 }

-#[cfg(target_os = "linux")]
+#[cfg(any(target_os = "linux", target_os = "freebsd"))]
 fn cc_config() {
   // Nothing to link on linux
 }
~

@smeech
Copy link
Collaborator

smeech commented Feb 17, 2024

Go for it!

@yurivict
Copy link
Author

I'll create a PR after I can build it.
Currently #1859 blocks it.

@AucaCoyan AucaCoyan added the help wanted Extra attention is needed label Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants