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

Build dynamic libs #325

Merged
merged 1 commit into from Jun 26, 2017

Conversation

Projects
None yet
2 participants
@izgzhen
Collaborator

izgzhen commented Jun 14, 2017

Solve #4

@izgzhen

This comment has been minimized.

Show comment
Hide comment
@izgzhen

izgzhen Jun 14, 2017

Collaborator

It can successful compile a hello-world dynamically now:

inplace/bin/ghc-stage2 -dynamic --make ~/Desktop/Playground/Main.hs
Collaborator

izgzhen commented Jun 14, 2017

It can successful compile a hello-world dynamically now:

inplace/bin/ghc-stage2 -dynamic --make ~/Desktop/Playground/Main.hs
@snowleopard

This comment has been minimized.

Show comment
Hide comment
@snowleopard

snowleopard Jun 14, 2017

Owner

@izgzhen Whoa, hang on, you're moving too fast! You were supposed to start the Summer of Haskell yesterday, but you already resolved the two main issues :D

I'll do my best to review both PRs tomorrow -- today's is a bit busy.

Owner

snowleopard commented Jun 14, 2017

@izgzhen Whoa, hang on, you're moving too fast! You were supposed to start the Summer of Haskell yesterday, but you already resolved the two main issues :D

I'll do my best to review both PRs tomorrow -- today's is a bit busy.

@izgzhen

This comment has been minimized.

Show comment
Hide comment
@izgzhen

izgzhen Jun 14, 2017

Collaborator

I'll do my best to review both PRs tomorrow -- today's is a bit busy.

:-) Take your time, thanks

Collaborator

izgzhen commented Jun 14, 2017

I'll do my best to review both PRs tomorrow -- today's is a bit busy.

:-) Take your time, thanks

Show outdated Hide outdated src/Rules.hs
mconcat [ arg "-no-auto-link-packages"
mconcat [ (Dynamic `wayUnit` way) ?
append [ "-shared", "-dynamic", "-dynload", "deploy" ]
, arg "-no-auto-link-packages"

This comment has been minimized.

@snowleopard

snowleopard Jun 16, 2017

Owner

I'm confused why -no-auto-link-packages is not included in the above append.

@snowleopard

snowleopard Jun 16, 2017

Owner

I'm confused why -no-auto-link-packages is not included in the above append.

This comment has been minimized.

@izgzhen

izgzhen Jun 16, 2017

Collaborator

Isn't it still on the line after the append? Both static and dynamic needs that flag I think.

@izgzhen

izgzhen Jun 16, 2017

Collaborator

Isn't it still on the line after the append? Both static and dynamic needs that flag I think.

This comment has been minimized.

@snowleopard

snowleopard Jun 16, 2017

Owner

Ah, my bad! Please disregard this comment.

@snowleopard

snowleopard Jun 16, 2017

Owner

Ah, my bad! Please disregard this comment.

@snowleopard

This comment has been minimized.

Show comment
Hide comment
@snowleopard

snowleopard Jun 16, 2017

Owner

Nice, looks a lot simpler than I imagined :-)

I've added a few minor comments.

Does this fully solve #4? I remember varous mysterious settings like DynamicGhcPrograms, DYNAMIC_TOO, etc. Also, what about Windows? Wasn't there a recent GHC patch that implemented dynamic way on Windows?

Owner

snowleopard commented Jun 16, 2017

Nice, looks a lot simpler than I imagined :-)

I've added a few minor comments.

Does this fully solve #4? I remember varous mysterious settings like DynamicGhcPrograms, DYNAMIC_TOO, etc. Also, what about Windows? Wasn't there a recent GHC patch that implemented dynamic way on Windows?

@snowleopard

This comment has been minimized.

Show comment
Hide comment
@snowleopard

snowleopard Jun 16, 2017

Owner

By the way, Linux CI fails.

Owner

snowleopard commented Jun 16, 2017

By the way, Linux CI fails.

@izgzhen

This comment has been minimized.

Show comment
Hide comment
@izgzhen

izgzhen Jun 17, 2017

Collaborator

By the way, Linux CI fails.

Ah, my bad, dylib is a mac OS thing, the Linux uses so

Collaborator

izgzhen commented Jun 17, 2017

By the way, Linux CI fails.

Ah, my bad, dylib is a mac OS thing, the Linux uses so

@izgzhen

This comment has been minimized.

Show comment
Hide comment
@izgzhen

izgzhen Jun 17, 2017

Collaborator

Also, what about Windows? Wasn't there a recent GHC patch that implemented dynamic way on Windows?

Including Windows, I will work on the platform thing soon

Collaborator

izgzhen commented Jun 17, 2017

Also, what about Windows? Wasn't there a recent GHC patch that implemented dynamic way on Windows?

Including Windows, I will work on the platform thing soon

@izgzhen

This comment has been minimized.

Show comment
Hide comment
@izgzhen

izgzhen Jun 21, 2017

Collaborator

Including Windows, I will work on the platform thing soon

Well, I found that it is hard to test Windows-version on my machine for now. Can I leave it for future?

Collaborator

izgzhen commented Jun 21, 2017

Including Windows, I will work on the platform thing soon

Well, I found that it is hard to test Windows-version on my machine for now. Can I leave it for future?

@snowleopard

This comment has been minimized.

Show comment
Hide comment
@snowleopard

snowleopard Jun 21, 2017

Owner

Well, I found that it is hard to test Windows-version on my machine for now. Can I leave it for future?

Yes, sure.

Owner

snowleopard commented Jun 21, 2017

Well, I found that it is hard to test Windows-version on my machine for now. Can I leave it for future?

Yes, sure.

@izgzhen

This comment has been minimized.

Show comment
Hide comment
@izgzhen

izgzhen Jun 23, 2017

Collaborator

I remember varous mysterious settings like DynamicGhcPrograms, DYNAMIC_TOO

Relevant wiki:

Looks like this issue is around GHCi, a more specialized problem. I believe it is one of the dynamic way milestone tasks, but I prefer to submit a separate issue and PR for it.

Then how should I define this PR? "Build dynamic libs for GHC executable compilation"?

Collaborator

izgzhen commented Jun 23, 2017

I remember varous mysterious settings like DynamicGhcPrograms, DYNAMIC_TOO

Relevant wiki:

Looks like this issue is around GHCi, a more specialized problem. I believe it is one of the dynamic way milestone tasks, but I prefer to submit a separate issue and PR for it.

Then how should I define this PR? "Build dynamic libs for GHC executable compilation"?

@izgzhen

This comment has been minimized.

Show comment
Hide comment
@izgzhen

izgzhen Jun 23, 2017

Collaborator

BTW, I should have fixed the Linux dynamic lib. The weird bit is, for object like rts/Adjust.dyn_o, the old system use ghc-stage2 to build it (the source is C and it works!), while our system will use Cc builder. So the ultimate .dyn_o is built by different commands, comparing my patch and the reference.

Collaborator

izgzhen commented Jun 23, 2017

BTW, I should have fixed the Linux dynamic lib. The weird bit is, for object like rts/Adjust.dyn_o, the old system use ghc-stage2 to build it (the source is C and it works!), while our system will use Cc builder. So the ultimate .dyn_o is built by different commands, comparing my patch and the reference.

@snowleopard

This comment has been minimized.

Show comment
Hide comment
@snowleopard

snowleopard Jun 23, 2017

Owner

Looks like this issue is around GHCi, a more specialized problem. I believe it is one of the dynamic way milestone tasks, but I prefer to submit a separate issue and PR for it.

Yes, sounds good.

Then how should I define this PR? "Build dynamic libs for GHC executable compilation"?

Works for me!

Owner

snowleopard commented Jun 23, 2017

Looks like this issue is around GHCi, a more specialized problem. I believe it is one of the dynamic way milestone tasks, but I prefer to submit a separate issue and PR for it.

Yes, sounds good.

Then how should I define this PR? "Build dynamic libs for GHC executable compilation"?

Works for me!

@snowleopard

This comment has been minimized.

Show comment
Hide comment
@snowleopard

snowleopard Jun 23, 2017

Owner

The weird bit is, for object like rts/Adjust.dyn_o, the old system use ghc-stage2 to build it (the source is C and it works!), while our system will use Cc builder

Yes, I never found out what was the reason to use GHC for compiling C files, so I decided to use Cc instead. I hope it won't bite us. I suggest to stick to using Cc unless you see a potential problem.

Owner

snowleopard commented Jun 23, 2017

The weird bit is, for object like rts/Adjust.dyn_o, the old system use ghc-stage2 to build it (the source is C and it works!), while our system will use Cc builder

Yes, I never found out what was the reason to use GHC for compiling C files, so I decided to use Cc instead. I hope it won't bite us. I suggest to stick to using Cc unless you see a potential problem.

@izgzhen

This comment has been minimized.

Show comment
Hide comment
@izgzhen

izgzhen Jun 24, 2017

Collaborator

I pushed the patch to follow the upstream change of dropping hoopl dependency in this PR as well. Should I open another PR for it?

Also, it should really work now, but both Linux and OS X CI timeout due to the lengthy process of building dynamic libs.

Collaborator

izgzhen commented Jun 24, 2017

I pushed the patch to follow the upstream change of dropping hoopl dependency in this PR as well. Should I open another PR for it?

Also, it should really work now, but both Linux and OS X CI timeout due to the lengthy process of building dynamic libs.

@izgzhen izgzhen referenced this pull request Jun 24, 2017

Closed

OS X CI timeout #322

@snowleopard

This comment has been minimized.

Show comment
Hide comment
@snowleopard

snowleopard Jun 24, 2017

Owner

@izgzhen I'd prefer a separate PR for dropping hoopl.

but both Linux and OS X CI timeout due to the lengthy process of building dynamic libs

So, let's remove dynamic from quickest. We have a separate issue where we'll keep discussing this.

Owner

snowleopard commented Jun 24, 2017

@izgzhen I'd prefer a separate PR for dropping hoopl.

but both Linux and OS X CI timeout due to the lengthy process of building dynamic libs

So, let's remove dynamic from quickest. We have a separate issue where we'll keep discussing this.

@izgzhen

This comment has been minimized.

Show comment
Hide comment
@izgzhen

izgzhen Jun 25, 2017

Collaborator

So, let's remove dynamic from quickest. We have a separate issue where we'll keep discussing this.

Done (quick still keeps it).

Collaborator

izgzhen commented Jun 25, 2017

So, let's remove dynamic from quickest. We have a separate issue where we'll keep discussing this.

Done (quick still keeps it).

@snowleopard

This comment has been minimized.

Show comment
Hide comment
@snowleopard

snowleopard Jun 25, 2017

Owner

@izgzhen Thanks! Shall I merge this one too?

Owner

snowleopard commented Jun 25, 2017

@izgzhen Thanks! Shall I merge this one too?

@snowleopard

This comment has been minimized.

Show comment
Hide comment
@snowleopard

snowleopard Jun 25, 2017

Owner

I've added a couple of more comments after looking through the code again.

Owner

snowleopard commented Jun 25, 2017

I've added a couple of more comments after looking through the code again.

@izgzhen

This comment has been minimized.

Show comment
Hide comment
@izgzhen

izgzhen Jun 26, 2017

Collaborator

Shall I merge this one too?

I am ready now, you may merge if as you see fit.

Collaborator

izgzhen commented Jun 26, 2017

Shall I merge this one too?

I am ready now, you may merge if as you see fit.

@snowleopard snowleopard merged commit 49b13b8 into snowleopard:master Jun 26, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@snowleopard

This comment has been minimized.

Show comment
Hide comment
@snowleopard

snowleopard Jun 26, 2017

Owner

Thanks! Merged.

Owner

snowleopard commented Jun 26, 2017

Thanks! Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment