j-asefa / slsqp4j

A JVM wrapper for the popular SLSQP optimizer
Other
27 stars 7 forks source link

Build is broken on Windows #15

Open disacrol opened 2 years ago

disacrol commented 2 years ago

Build is broken in Windows due to PR #12.

This is because build folder and sub-folders creation gradle tasks were set back again as type "Exec", which requires a commandLine to be explicitly defined. Otherwise it will fail:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':slsqp4j:prepareC'.
> execCommand == null!

mkdir method should be able to automatically create directories recursively in any platform. See gradle docs regarding mkdir.

@pkernevez are you sure mkdir was failing to create the build folder and its subfolders in MacOsx? Because in Unix (I tried in CentOS / RedHat) mkdir worked its way just fine in creating the whole folder structure).

disacrol commented 2 years ago

@pkernevez I could easily create a PR to make sure prepareC remains an Exec task specifying the commandLine if os is windows. But I'd rather make sure mkdir really fails in MacOS. Because the build script would be much cleaner that way.

SergyD commented 1 year ago

@disacrol Is there a way to solve this Issue? I tried to build it on Windows and I get the same exception.

SergyD commented 1 year ago

I did manage to get it going by using the old build.gradle file. However, gradle clean build fails because the maven plugin is obsolete, so I had to use ./gradlew clean build instead. Even after that, it gives me this failure: Assembler messages: Fatal error: can't create C:*\slsqp4j\slsqp4j\build\c\slsqp.o: No such file or directory

FAILURE: Build failed with an exception.

Any idea of what it can be?

Serrof commented 1 year ago

Does this broken build explain why the maven central jar does not work on windows?

Aschraf commented 3 days ago

Not working on windows, sadly. I guess it's not really maintained anymore.