Comments (7)
Yes, I got the same error with your reproducer.
Aha, it looks like GHCI provides a third scenario beyond "ghc" and "ghc -threaded".
In fixing Issue #8, I made sure that duplicate versions of the relevant functions were there to support normal compilation/linking with or without -threaded. Actually, in both of THOSE cases "cas" is available, but the other barrier functions are not. Yet it looks like in the GHCI case "cas" is not available.
I think the fix can simply be extended to cover this.
from haskell-lockfree.
Ugh, working on it. Past the 'cas' error and now getting this:
Loading package atomic-primops-0.4 ... linking ... ghc: /u/rrnewton/.cabal/lib/atomic-primops-0.4/ghc-7.6.3/HSatomic-primops-0.4.o: unknown symbol `stg_MUT_VAR_CLEAN_info'
Also, I'd welcome a pull request with a simplified version of the reproducer in it. Or any other tests you have that are giving problems.
from haskell-lockfree.
I'm afraid I'm stumped on this until I dig a bit more into how GHCI works. The library has a bunch of undefined symbols which need to be satisfied by the RTS.
U base_GHCziBase_zpzp_info
U base_GHCziForeignPtr_ForeignPtr_con_info
U base_GHCziForeignPtr_MallocPtr_con_info
U base_GHCziForeignPtr_mallocForeignPtr3_closure
U base_GHCziSTRef_STRef_con_info
U base_GHCziSTRef_readSTRef1_info
U base_GHCziShow_DZCShow_static_info
U base_GHCziShow_showListzuzu_info
U dirty_MUT_VAR
U fetch_and_add_word
U ghczmprim_GHCziCString_unpackCStringzh_info
U ghczmprim_GHCziClasses_DZCEq_static_info
U ghczmprim_GHCziTuple_Z0T_closure
U ghczmprim_GHCziTuple_Z2T_con_info
U ghczmprim_GHCziTypes_Bool_closure_tbl
U ghczmprim_GHCziTypes_False_closure
U ghczmprim_GHCziTypes_Izh_con_info
U ghczmprim_GHCziTypes_True_closure
U newCAF
U stg_CAF_BLACKHOLE_info
U stg_MUT_ARR_PTRS_DIRTY_info
U stg_MUT_VAR_CLEAN_info
U stg_ap_0_fast
U stg_atomicModifyMutVarzh
U stg_bh_upd_frame_info
U stg_gc_ut
U stg_newAlignedPinnedByteArrayzh
U stg_newByteArrayzh
U stg_newMutVarzh
U stg_upd_frame_info
U val_compare_and_swap_word
Maybe there's some library or object that atomic-primops can explicitly depend on to make sure this stuff gets linked?
from haskell-lockfree.
Update: Simon Marlow said this is a GHC bug and that he'll fix it:
http://www.haskell.org/pipermail/ghc-devs/2013-July/001714.html
from haskell-lockfree.
By the way, I don't run into this bug on Mac. This is a Linux-specific bug it seems.
from haskell-lockfree.
This bug remains for 7.6 but it's fixed in 7.8 so I'm closing this now.
from haskell-lockfree.
I'm running into this bug with ghc-7.8.3 on linux. We're using ghc with the following
,("Dynamic by default","NO")
,("GHC Dynamic","NO")
but otherwise it's a standard build. I've hacked around it by enabling RtsDup for now, but I think it may be a remaining bug in ghc. Just wanted to point it out in case other users run into the same problem. Also I wonder if it works on Windows at all (which AFAIK is also not dynamic by default).
from haskell-lockfree.
Related Issues (20)
- Cannot find module "Data.Atomics.Counter.Unboxed" HOT 6
- Are memory barriers compiler reordering barriers? HOT 1
- Various cabal issues.
- Saw a genuine nondeterministic test failure
- atomic-primops: can GC duplication of pure objects screw up Tickets and cause a false negative?
- atomic-primops: ghc 8 support needed HOT 7
- Build fail on armv8
- atomic-primops: Need to make barriers inline primops HOT 3
- Missing load-store barrier HOT 1
- [chaselev-deque] stackage availability HOT 4
- Provide loop wrapper for casArrayElem? HOT 2
- Implement multi-item CAS (CASN) HOT 2
- Cut a new atomic-primops release for GHC 8.2.1 HOT 2
- testing/Fetch.hs missing from Hackage release HOT 1
- Recursion in haddocks of `atomic-primops` HOT 1
- CAS fails with newly created ticket HOT 8
- CAS very rarely fails not due to a race, in GHC >= 8.2
- [lockfree-queue]: GHC 9.4 support HOT 2
- Release chaselev-deque-0.5.0.6 on hackage HOT 1
- No more load_load_barrier in GHC HEAD HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from haskell-lockfree.