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

Compile error on MacOS #3

Closed
Jaaaaaay opened this issue Apr 27, 2020 · 4 comments
Closed

Compile error on MacOS #3

Jaaaaaay opened this issue Apr 27, 2020 · 4 comments

Comments

@Jaaaaaay
Copy link

I have some error on compiling jpmml-catboost on my Mac, The error massage is "Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.4.0:exec (default) on project jpmml-catboost: Command execution failed.: Process exited with an error: 126 (Exit value: 126) " and the command "jpmml-catboost/target/bin/flatc" is not a executable binary file on MacOS, How will I do next?

@Jaaaaaay
Copy link
Author

I solved the problem, compiling the FlatBuffers(v1.10.0, because the latest version cannot fit). replacing the command "${project.build.directory}/bin/flatc" with compiled flatc in pom.xml. then mvn clean install work. Thank you!

@akhnatal
Copy link

Download
https://github.com/google/flatbuffers/releases/tag/v1.10.0

Extract and compile

  • tar xzf flatbuffers-1.10.0.tar.gz
  • cd flatbuffers-1.10.0
  • cmake -G "Unix Makefiles"
  • make

Modify the pom.xml

<configuration>
	<executable>flatbuffers-1.10.0/flatc</executable>
	<workingDirectory>src/main/fbs</workingDirectory>
	<arguments>
		<argument>--java</argument>
		<argument>--gen-all</argument>
		<argument>-o</argument>
		<argument>${project.build.directory}/generated-sources/java</argument>
		<argument>model.fbs</argument>
	</arguments>
</configuration>

To be more specific.

@moideen
Copy link

moideen commented Mar 5, 2024

This approach does not work on MacOS Sonoma 14.3.1

Running make results in the following error:

/path/to/flatbuffers-1.10.0/include/flatbuffers/flatbuffers.h:1613:25: **error**: definition of implicit copy constructor for 'TableKeyComparator<reflection::Object>' is deprecated because it has a user-provided copy assignment operator [-Werror,-Wdeprecated-copy-with-user-provided-copy]
    TableKeyComparator &operator=(const TableKeyComparator &);

Compiler / OS details:

Apple clang version 15.0.0 (clang-1500.1.0.2.5)
Target: arm64-apple-darwin23.3.0
Thread model: posix

This is actually a flatbuffers issue but just flagging here that the above resolution may not work.

@rurao
Copy link

rurao commented Aug 14, 2024

Got this to work on Sonoma by installing flatbuffers-1.10.0 using brew install (had to force the version) and then

Modifying the pom.xml "${project.build.directory}/bin/flatc" with just flatc

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

4 participants