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

Allow multiple Scala Native versions #502

Merged
merged 2 commits into from
Aug 29, 2019
Merged

Allow multiple Scala Native versions #502

merged 2 commits into from
Aug 29, 2019

Conversation

lolgab
Copy link
Contributor

@lolgab lolgab commented Aug 8, 2019

This change allows multiple versions of Scala Native.

@non
Copy link
Contributor

non commented Aug 8, 2019

@lolgab I've never been able to successfully run native/test. What's the best way for me to figure out how to do this?

(I realize it's not your job to help debug my Scala Native problems, but for me to do a release with Scala Native I need to get this working. I did follow the Scala Native instructions.)

I can build fine:

sbt:scalacheck> native/clean
[success] Total time: 1 s, completed Aug 8, 2019 1:17:17 PM
sbt:scalacheck> native/compile
sbt:scalacheck> native/compile
[info] Updating native...
[info] Done updating.
[info] Compiling 21 Scala sources to /Users/erik/w/scalacheck/native/target/scala-2.11/classes ...
[info] Done compiling.

But when I go to run native/test I see:

sbt:scalacheck> native/test
[info] Compiling 7 Scala sources to /Users/erik/w/scalacheck/native/target/scala-2.11/test-classes ...
[info] Done compiling.
[info] Compiling 1 Scala source to /Users/erik/w/scalacheck/native/target/scala-2.11/test-classes ...
[info] Done compiling.
[info] Linking (3279 ms)
[info] Discovered 2499 classes and 15331 methods
[info] Optimizing (debug mode) (4344 ms)
[info] Generating intermediate code (1589 ms)
[info] Produced 58 files
[info] Compiling to native code (2647 ms)
[error] /Users/erik/w/scalacheck/native/target/scala-2.11/native/lib/posix/cpio.c:1:10: fatal error: 'cpio.h' file not found
[error] /Users/erik/w/scalacheck/native/target/scala-2.11/native/lib/platform.c:4:10: fatal error: 'sys/utsname.h' file not found
[error] /Users/erik/w/scalacheck/native/target/scala-2.11/native/lib/gc/immix/Marker.c:1:10: fatal error: 'stdio.h' file not found
[error] #include <stdio.h>
[error] /Users/erik/w/scalacheck/native/target/scala-2.11/native/lib/pwd.c:1:10: fatal error: 'stdlib.h' file not found
[error]          ^
[error] #include <sys/utsname.h>
[error] #include <stdlib.h>
[error]          ^
[error]          ^
[error] In file included from /Users/erik/w/scalacheck/native/target/scala-2.11/native/lib/posix/sys/socket_conversions.c:1:
[error] #include <cpio.h>
[error] /Users/erik/w/scalacheck/native/target/scala-2.11/native/lib/posix/sys/../netinet/in.h:4:10: fatal error: 'netinet/in.h' file not found
[error] /Users/erik/w/scalacheck/native/target/scala-2.11/native/lib/grp.c:1:10: fatal error: 'stdlib.h' file not found
[error] /Users/erik/w/scalacheck/native/target/scala-2.11/native/lib/posix/arpa/inet.c:1:10: fatal error: 'arpa/inet.h' file not found
[error] #include <netinet/in.h>
[error]          ^
[error]          ^
[error] #include <arpa/inet.h>
[error] #include <stdlib.h>
[error]          ^
[error]          ^
[error] In file included from /Users/erik/w/scalacheck/native/target/scala-2.11/native/lib/posix/netdb.c:1:
[error] /Users/erik/w/scalacheck/native/target/scala-2.11/native/lib/posix/netdb.h:1:10: error: 'netdb.h' file not found with <angled> include; use "quotes" instead
[error] #include <netdb.h>
[error]          ^~~~~~~~~
[error]          "netdb.h"
[error] In file included from /Users/erik/w/scalacheck/native/target/scala-2.11/native/lib/posix/netdb.c:1:
[error] In file included from /Users/erik/w/scalacheck/native/target/scala-2.11/native/lib/posix/netdb.h:1:
[error] /Users/erik/w/scalacheck/native/target/scala-2.11/native/lib/posix/netdb.h:1:10: error: 'netdb.h' file not found with <angled> include; use "quotes" instead
[error] #include <netdb.h>
[error]          ^~~~~~~~~
[error]          "netdb.h"
[error] In file included from /Users/erik/w/scalacheck/native/target/scala-2.11/native/lib/posix/netdb.c:1:
[error] In file included from /Users/erik/w/scalacheck/native/target/scala-2.11/native/lib/posix/netdb.h:1:
[error] In file included from /Users/erik/w/scalacheck/native/target/scala-2.11/native/lib/posix/netdb.h:1:
[error] /Users/erik/w/scalacheck/native/target/scala-2.11/native/lib/posix/netdb.h:1:10: error: 'netdb.h' file not found with <angled> include; use "quotes" instead
[error] #include <netdb.h>
[error]          ^~~~~~~~~
[error]          "netdb.h"
[error] In file included from /Users/erik/w/scalacheck/native/target/scala-2.11/native/lib/posix/netdb.c:1:
[error] In file included from /Users/erik/w/scalacheck/native/target/scala-2.11/native/lib/posix/netdb.h:1:
[error] In file included from /Users/erik/w/scalacheck/native/target/scala-2.11/native/lib/posix/netdb.h:1:
[error] In file included from /Users/erik/w/scalacheck/native/target/scala-2.11/native/lib/posix/netdb.h:1:
[error] /Users/erik/w/scalacheck/native/target/scala-2.11/native/lib/posix/netdb.h:1:10: error: 'netdb.h' file not found with <angled> include; use "quotes" instead
[error] #include <netdb.h>
[error]          ^~~~~~~~~
[error]          "netdb.h"
[error] In file included from /Users/erik/w/scalacheck/native/target/scala-2.11/native/lib/posix/netdb.c:1:
[error] In file included from /Users/erik/w/scalacheck/native/target/scala-2.11/native/lib/posix/netdb.h:1:
[error] In file included from /Users/erik/w/scalacheck/native/target/scala-2.11/native/lib/posix/netdb.h:1:
[error] In file included from /Users/erik/w/scalacheck/native/target/scala-2.11/native/lib/posix/netdb.h:1:
[error] In file included from /Users/erik/w/scalacheck/native/target/scala-2.11/native/lib/posix/netdb.h:1:
[error] /Users/erik/w/scalacheck/native/target/scala-2.11/native/lib/posix/netdb.h:1:10: error: 'netdb.h' file not found with <angled> include; use "quotes" instead
[error] #include <netdb.h>
[error]          ^~~~~~~~~
[error]          "netdb.h"
[error] In file included from /Users/erik/w/scalacheck/native/target/scala-2.11/native/lib/posix/netdb.c:1:
[error] In file included from /Users/erik/w/scalacheck/native/target/scala-2.11/native/lib/posix/netdb.h:1:
[error] In file included from /Users/erik/w/scalacheck/native/target/scala-2.11/native/lib/posix/netdb.h:1:
[error] In file included from /Users/erik/w/scalacheck/native/target/scala-2.11/native/lib/posix/netdb.h:1:
[error] In file included from /Users/erik/w/scalacheck/native/target/scala-2.11/native/lib/posix/netdb.h:1:
[error] In file included from /Users/erik/w/scalacheck/native/target/scala-2.11/native/lib/posix/netdb.h:1:
[error] /Users/erik/w/scalacheck/native/target/scala-2.11/native/lib/posix/netdb.h:1:10: error: 'netdb.h' file not found with <angled> include; use "quotes" instead
[error] #include <netdb.h>
[error]          ^~~~~~~~~
[error]          "netdb.h"

@lolgab
Copy link
Contributor Author

lolgab commented Aug 9, 2019

Did you try to install xcode clang?

xcode-select --install

I am on a Mac Mojave machine and it works.
I'm happy to help you and I understand you don't want to release a software without testing it yourself.

@non
Copy link
Contributor

non commented Aug 9, 2019

I do have the command line tools installed:

$ xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates

(EDIT: according to Software Update I am up-to-date.)

@non
Copy link
Contributor

non commented Aug 19, 2019

Update: I got the native build working on my other computer. I'm going to confirm that this works locally and then I'll be happy to merge. Thanks for bearing with me.

(I still can't figure out why it doesn't work on the first computer, which is frustrating.)

@lolgab
Copy link
Contributor Author

lolgab commented Aug 19, 2019

Don't forget to publish for 0.3.9 and 0.4.0-M2 using the environment variable if you do :)

@non non mentioned this pull request Aug 28, 2019
@non
Copy link
Contributor

non commented Aug 29, 2019

Just confirmed again that this PR works locally (on my machine that is able to run Scala Native).

@non non merged commit c665fe1 into typelevel:master Aug 29, 2019
@lolgab lolgab deleted the scala-native-0.4.0-M2 branch August 29, 2019 08:00
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

Successfully merging this pull request may close these issues.

2 participants