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

publish artifacts for scala-native #396

Closed
xuwei-k opened this issue Apr 23, 2018 · 14 comments
Closed

publish artifacts for scala-native #396

xuwei-k opened this issue Apr 23, 2018 · 14 comments

Comments

@xuwei-k
Copy link
Contributor

xuwei-k commented Apr 23, 2018

No description provided.

@olafurpg
Copy link

Is there a way I can help here? This is one of the last blocking issues for native scalafmt (scalameta/scalafmt#1172).

@rickynils
Copy link
Contributor

@olafurpg I get the following errors when trying to build for scala native:

bt:scalacheck> test
[info] Linking (2500 ms)
[info] Discovered 2454 classes and 15161 methods
[info] Optimizing (debug mode) (6345 ms)
[info] Generating intermediate code (1987 ms)
[info] Produced 56 files
[info] Compiling to native code (3549 ms)
[error] /home/rickard/src/scalacheck/native/target/scala-2.11/native/lib/posix/sys/ioctl.c:1:10: fatal error: 'sys/ioctl.h' file not found
[error] #include <sys/ioctl.h>
[error]          ^~~~~~~~~~~~~
[error] 1 error generated.
[error] /home/rickard/src/scalacheck/native/target/scala-2.11/native/lib/gc/boehm/gc.c:1:10: fatal error: 'gc.h' file not found
[error] #include <gc.h>
[error]          ^~~~~~
[error] 1 error generated.
[error] /home/rickard/src/scalacheck/native/target/scala-2.11/native/lib/utime.c:1:10: fatal error: 'utime.h' file not found
[error] #include <utime.h>
[error]          ^~~~~~~~~
[error] 1 error generated.
[error] /home/rickard/src/scalacheck/native/target/scala-2.11/native/lib/unwind.c:1:10: fatal error: 'libunwind.h' file not found
[error] #include <libunwind.h>
[error]          ^~~~~~~~~~~~~
[error] 1 error generated.
[error] /home/rickard/src/scalacheck/native/target/scala-2.11/native/lib/posix/sys/socket.c:1:10: fatal error: 'netinet/in.h' file not found
[error] #include <netinet/in.h>
[error]          ^~~~~~~~~~~~~~
[error] /home/rickard/src/scalacheck/native/target/scala-2.11/native/lib/complex.c:1:10: fatal error: 'complex.h' file not found
[error] #include <complex.h>
[error]          ^~~~~~~~~~~
[error] 1 error generated.
[error] 1 error generated.
[error] /home/rickard/src/scalacheck/native/target/scala-2.11/native/lib/stat.c:2:10: fatal error: 'sys/stat.h' file not found
[error] #include <sys/stat.h>
[error]          ^~~~~~~~~~~~
[error] 1 error generated.
[error] /home/rickard/src/scalacheck/native/target/scala-2.11/native/lib/posix/netinet/in.c:1:10: fatal error: 'netinet/in.h' file not found
[error] #include <netinet/in.h>
[error]          ^~~~~~~~~~~~~~
[error] 1 error generated.
[error] /home/rickard/src/scalacheck/native/target/scala-2.11/native/lib/posix/arpa/inet.c:1:10: fatal error: 'arpa/inet.h' file not found
[error] #include <arpa/inet.h>
[error]          ^~~~~~~~~~~~~
[error] 1 error generated.
[error] /home/rickard/src/scalacheck/native/target/scala-2.11/native/lib/fcntl.c:1:10: fatal error: 'fcntl.h' file not found
[error] #include <fcntl.h>
[error]          ^~~~~~~~~
[error] 1 error generated.
[error] /home/rickard/src/scalacheck/native/target/scala-2.11/native/lib/time.c:1:10: fatal error: 'stdio.h' file not found
[error] #include <stdio.h>
[error]          ^~~~~~~~~
[error] 1 error generated.
[error] /home/rickard/src/scalacheck/native/target/scala-2.11/native/lib/posix.c:1:10: fatal error: 'stdio.h' file not found
[error] #include <stdio.h>
[error]          ^~~~~~~~~
[error] 1 error generated.
[error] /home/rickard/src/scalacheck/native/target/scala-2.11/native/lib/posix/syslog.c:1:10: fatal error: 'syslog.h' file not found
[error] #include <syslog.h>
[error]          ^~~~~~~~~~
[error] 1 error generated.
[error] /home/rickard/src/scalacheck/native/target/scala-2.11/native/lib/statvfs.c:1:10: fatal error: 'stdlib.h' file not found
[error] #include <stdlib.h>
[error]          ^~~~~~~~~~
[error] 1 error generated.
[error] /home/rickard/src/scalacheck/native/target/scala-2.11/native/lib/wrap.c:1:10: fatal error: 'stdio.h' file not found
[error] #include <stdio.h>
[error]          ^~~~~~~~~
[error] 1 error generated.
[error] In file included from /home/rickard/src/scalacheck/native/target/scala-2.11/native/lib/posix/sys/socket_conversions.c:1:
[error] /home/rickard/src/scalacheck/native/target/scala-2.11/native/lib/posix/sys/../netinet/in.h:4:10: fatal error: 'netinet/in.h' file not found
[error] #include <netinet/in.h>
[error]          ^~~~~~~~~~~~~~
[error] 1 error generated.
[error] /home/rickard/src/scalacheck/native/target/scala-2.11/native/lib/posix/cpio.c:1:10: fatal error: 'cpio.h' file not found
[error] #include <cpio.h>
[error]          ^~~~~~~~
[error] 1 error generated.
[error] /home/rickard/src/scalacheck/native/target/scala-2.11/native/lib/posix/sys/select.c:1:10: fatal error: 'sys/select.h' file not found
[error] #include <sys/select.h>
[error]          ^~~~~~~~~~~~~~
[error] /home/rickard/src/scalacheck/native/target/scala-2.11/native/lib/pthread.c:1:10: fatal error: 'pthread.h' file not found
[error] 1 error generated.
[error] #include <pthread.h>
[error]          ^~~~~~~~~~~
[error] 1 error generated.
[error] java.lang.RuntimeException: Failed to compile native library runtime code.
[error] 	at scala.sys.package$.error(package.scala:27)
[error] 	at scala.scalanative.build.LLVM$.$anonfun$compileNativelib$5(LLVM.scala:102)
[error] 	at scala.scalanative.build.LLVM$.$anonfun$compileNativelib$5$adapted(LLVM.scala:90)
[error] 	at scala.collection.parallel.mutable.ParArray$ParArrayIterator.foreach(ParArray.scala:142)
[error] 	at scala.collection.parallel.ParIterableLike$Foreach.leaf(ParIterableLike.scala:970)
[error] 	at scala.collection.parallel.Task.$anonfun$tryLeaf$1(Tasks.scala:49)
[error] 	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
[error] 	at scala.util.control.Breaks$$anon$1.catchBreak(Breaks.scala:63)
[error] 	at scala.collection.parallel.Task.tryLeaf(Tasks.scala:52)
[error] 	at scala.collection.parallel.Task.tryLeaf$(Tasks.scala:46)
[error] 	at scala.collection.parallel.ParIterableLike$Foreach.tryLeaf(ParIterableLike.scala:967)
[error] 	at scala.collection.parallel.AdaptiveWorkStealingTasks$WrappedTask.internal(Tasks.scala:156)
[error] 	at scala.collection.parallel.AdaptiveWorkStealingTasks$WrappedTask.internal$(Tasks.scala:153)
[error] 	at scala.collection.parallel.AdaptiveWorkStealingForkJoinTasks$WrappedTask.internal(Tasks.scala:440)
[error] 	at scala.collection.parallel.AdaptiveWorkStealingTasks$WrappedTask.compute(Tasks.scala:146)
[error] 	at scala.collection.parallel.AdaptiveWorkStealingTasks$WrappedTask.compute$(Tasks.scala:145)
[error] 	at scala.collection.parallel.AdaptiveWorkStealingForkJoinTasks$WrappedTask.compute(Tasks.scala:440)
[error] 	at java.util.concurrent.RecursiveAction.exec(RecursiveAction.java:189)
[error] 	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
[error] 	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
[error] 	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
[error] 	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
[error] (Nativetest / nativeLink) Failed to compile native library runtime code.
[error] Total time: 16 s, completed May 12, 2018 9:53:49 AM

My clang version:

$ clang -v
clang version 5.0.1 (tags/RELEASE_501/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/rickard/.nix-profile/bin
Found candidate GCC installation: /nix/store/bm7pb1s7rx1ad80706b5xqrznq7fgpgx-gcc-7.3.0/lib/gcc/x86_64-unknown-linux-gnu/7.3.0
Found candidate GCC installation: /nix/store/bm7pb1s7rx1ad80706b5xqrznq7fgpgx-gcc-7.3.0/lib64/gcc/x86_64-unknown-linux-gnu/7.3.0
Selected GCC installation: /nix/store/bm7pb1s7rx1ad80706b5xqrznq7fgpgx-gcc-7.3.0/lib64/gcc/x86_64-unknown-linux-gnu/7.3.0
Candidate multilib: .;@m64
Selected multilib: .;@m64

@olafurpg
Copy link

Thanks for trying @rickynils

Have you followed the installation instructions for Nix at the bottom of this page here http://www.scala-native.org/en/latest/user/setup.html#installing-clang-and-runtime-dependencies ?

wget https://raw.githubusercontent.com/scala-native/scala-native/master/scripts/scala-native.nix
nix-shell scala-native.nix -A clangEnv

@densh
Copy link
Contributor

densh commented May 12, 2018

@rickynils You need to install a few packages that are necessary to build code with Scala Native, detailed instructions per OS are available here: http://www.scala-native.org/en/latest/user/setup.html

@lolgab
Copy link
Contributor

lolgab commented Jul 31, 2018

Hi, I tried running the tests with native target in my enviroment and they pass nicely.
The publication of scalacheck for scala native is essential to port many other libraries that use scalacheck (I was trying to port upickle and it depends on scalacheck).

[info] Done compiling.
[info] Linking (3352 ms)
[info] Discovered 2467 classes and 15197 methods
[info] Optimizing (debug mode) (5892 ms)
[info] Generating intermediate code (2410 ms)
[info] Produced 58 files
[info] Compiling to native code (2518 ms)
[info] Linking native code (immix gc) (276 ms)
[info] Starting process '/home/lorenzo/scala/scalacheck/native/target/scala-2.11/scalacheck-out' on port '33663'.
[info] + Prop.Prop.==> undecided: OK, passed 100 tests.
[info] + Prop.Prop.|| Undecided: OK, passed 100 tests.
[info] + Prop.Prop.==> exception: OK, passed 100 tests.
[info] + Prop.Prop.&& Exception 2: OK, passed 100 tests.
[info] + Prop.Prop.&& Identity: OK, passed 100 tests.
[info] + Prop.Prop.|| True: OK, passed 100 tests.
[info] + Prop.Prop.&& Commutativity: OK, passed 100 tests.
[info] + Prop.Prop.++ Identity 2: OK, passed 100 tests.
[info] + Prop.exception: OK, passed 100 tests.
[info] + Prop.Prop.++ Commutativity: OK, passed 100 tests.
[info] + Prop.secure: OK, passed 100 tests.
[info] + Prop.someFailing: OK, passed 100 tests.
[info] + Prop.throws: OK, proved property.
[info] + Prop.Prop.==> true: OK, passed 100 tests.
[info] + Prop.Prop.++ Identity 1: OK, passed 100 tests.
[info] + Prop.Prop.&& Right prio: OK, passed 100 tests.
[info] + Prop.Prop.&& Exception: OK, passed 100 tests.
[info] + Prop.proved: OK, passed 100 tests.
[info] + Prop.sizedProp: OK, passed 100 tests.
[info] + Prop.prop.useSeed is deterministic (pt. 2): OK, passed 100 tests.
[info] + Prop.atLeastOne: OK, passed 100 tests.
[info] + Prop.Prop.++ False: OK, passed 100 tests.
[info] + Prop.undecided: OK, passed 100 tests.
[info] + Prop.Prop.&& Undecided: OK, passed 100 tests.
[info] + Prop.Prop.|| Exception: OK, passed 100 tests.
[info] + Prop.Prop.==> short circuit: OK, passed 100 tests.
[info] + Prop.prop.useSeed is deterministic: OK, passed 100 tests.
[info] + Prop.Prop.&& False: OK, passed 100 tests.
[info] + Prop.all: OK, passed 100 tests.
[info] + Prop.Prop.|| Identity: OK, passed 100 tests.
[info] + Prop.Gen.Parameters.withInitialSeed is deterministic: OK, passed 100 tests.
[info] + Prop.Prop.|| Commutativity: OK, passed 100 tests.
[info] + Prop.Prop.++ Exception: OK, passed 100 tests.
[info] + Prop.passed: OK, passed 100 tests.
[info] + Prop.falsified: OK, passed 100 tests.
[info] + Prop.delay: OK, proved property.
[info] + Prop.noneFailing: OK, passed 100 tests.
[info] + Prop.lzy: OK, proved property.
[info] + Examples.list tail: OK, passed 100 tests.
[info] + Examples.list head: OK, passed 100 tests.
[info] + Examples.ex1: OK, passed 100 tests.
[info] + Pretty.null: OK, proved property.
[info] + Pretty.any null: OK, proved property.
[info] + Shrink.non-zero byte: OK, passed 100 tests.
[info] + Shrink.Shrink[Duration] handles MinusInf: OK, proved property.
[info] + Shrink.short: OK, passed 100 tests.
[info] + Shrink.Shrink[Long] terminates: OK, passed 100 tests.
[info] + Shrink.Shrink[Double] handles NegativeInfinity: OK, proved property.
[info] + Shrink.Shrink[Float] handles PositiveInfinity: OK, proved property.
[info] + Shrink.non-zero short: OK, passed 100 tests.
[info] + Shrink.Shrink[Byte] terminates: OK, passed 100 tests.
[info] + Shrink.non-zero double: OK, passed 100 tests.
[info] + Shrink.non-zero long: OK, passed 100 tests.
[info] + Shrink.Shrink[Duration] handles Undefined: OK, proved property.
[info] + Shrink.byte: OK, passed 100 tests.
[info] + Shrink.Shrink[Float] handles NaN: OK, proved property.
[info] + Shrink.either right: OK, passed 100 tests.
[info] + Shrink.either shrinks: OK, passed 100 tests.
[info] + Shrink.non-zero finite duration: OK, passed 100 tests.
[info] + Shrink.Shrink[Double] handles PositiveInfinity: OK, proved property.
[info] + Shrink.Shrink[Double] handles NaN: OK, proved property.
[info] + Shrink.non-zero duration: OK, passed 100 tests.
[info] + Shrink.Shrink[Char] terminates: OK, passed 100 tests.
[info] + Shrink.Shrink[FiniteDuration] terminates: OK, passed 100 tests.
[info] + Shrink.non-zero float: OK, passed 100 tests.
[info] + Shrink.duration: OK, passed 100 tests.
[info] + Shrink.Shrink[Float] terminates: OK, passed 100 tests.
[info] + Shrink.Shrink[Duration] handles Inf: OK, proved property.
[info] + Shrink.Shrink[Double] terminates: OK, passed 100 tests.
[info] + Shrink.Shrink[Duration] terminates: OK, passed 100 tests.
[info] + Shrink.finite duration: OK, passed 100 tests.
[info] + Shrink.long: OK, passed 100 tests.
[info] + Shrink.float: OK, passed 100 tests.
[info] + Shrink.Shrink[Short] terminates: OK, passed 100 tests.
[info] + Shrink.Shrink[Int] terminates: OK, passed 100 tests.
[info] + Shrink.Shrink[Float] handles NegativeInfinity: OK, proved property.
[info] + Shrink.double: OK, passed 100 tests.
[info] + Shrink.int: OK, passed 100 tests.
[info] + Shrink.non-zero int: OK, passed 100 tests.
[info] + Shrink.either left: OK, passed 100 tests.
[info] + Math.sqrt: OK, passed 100 tests.
[info] + TestFingerprint.propobject: OK, proved property.
[info] + TestFingerprint.propclass: OK, proved property.
[info] Passed: Total 83, Failed 0, Errors 0, Passed 83
[success] Total time: 39 s, completed 31-lug-2018 12.45.37

@wjoel
Copy link

wjoel commented Aug 3, 2018

Works for me as well, [info] Passed: Total 83, Failed 0, Errors 0, Passed 83
Did the instructions in #396 (comment) help, @rickynils?

@s5bug
Copy link

s5bug commented Sep 18, 2018

Any news on this? Scalacheck is blocking many other libraries from getting Scala Native support.

kailuowang pushed a commit to typelevel/cats that referenced this issue Oct 19, 2018
Scalacheck hasn't published artifact for Scala Native yet and that cause
problems with indexing project in Intellij. Plan is to temporarily
disable Scala Native cross project until artifact will be available at
typelevel/scalacheck#396
fixes #2559
@cleverdeveloper
Copy link

@rickynils do you need any help with the ticket?

@lolgab
Copy link
Contributor

lolgab commented Feb 27, 2019

I've published the artifact under my groupid having seen no interest here by the maintainer. You can use "com.github.lolgab" %%% "scalacheck" % "0.14.1" as Scala Native dependency on other libraries.

@non
Copy link
Contributor

non commented Aug 8, 2019

I'm trying to pick up a bunch of these old issues and PRs.

I'm also having trouble building the native platform locally. I followed the Mac instructions on the Scala Native website (i.e. brew install llvm bdw-gc re2) and still end up seeing the same errors that Rickard did.

@lolgab
Copy link
Contributor

lolgab commented Aug 8, 2019

You could try with xcode clang:

xcode-select --install

I am on a Mac Mojave machine and it works. I can try to help you if you want.

@xuwei-k
Copy link
Contributor Author

xuwei-k commented Aug 8, 2019

@lolgab
Copy link
Contributor

lolgab commented Aug 8, 2019

It would be nice if you publish for Scala Native 0.4.0-M2 too.
I made a PR for the necessary chenges: #502

@xuwei-k
Copy link
Contributor Author

xuwei-k commented Sep 15, 2019

https://repo1.maven.org/maven2/org/scalacheck/scalacheck_native0.3_2.11/ 🎉

@xuwei-k xuwei-k closed this as completed Sep 15, 2019
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

9 participants