λ> :load BugC
[1 of 3] Compiling BugA ( BugA.hs, interpreted ) [Source file changed]
Ok, three modules loaded.
(0.01 secs,)
λ> bug
ld: warning: duplicate -rpath '/opt/homebrew/Cellar/gcc/15.2.0_1/lib/gcc/current/gcc/aarch64-apple-darwin25/15' ignored
ld: warning: -U option is redundant when using -undefined dynamic_lookup
GHC.Linker.Loader.dynLoadObjs: Loading temp shared object failed
During interactive linking, GHCi couldn't find the following symbol:
dlopen(/var/folders/n0/sz8qwjxd1rv1_0h1r16xr2_c0000gp/T/ghc9044_tmp_0_0/libghc_tmp_3.dylib, 0x0005): symbol not found in flat namespace '_BugA_x_closure'
This may be due to you not asking GHCi to load extra object files,
archives or DLLs needed by your current session. Restart GHCi, specifying
the missing library using the -L/path/to/object/dir and -lmissinglibname
flags, or simply by naming the relevant files on the GHCi command line.
Alternatively, this link failure might indicate a bug in GHCi.
If you suspect the latter, please report this as a GHC bug:
https://www.haskell.org/ghc/reportabug
An essential component of the reproducer is that you close ghci after the first :load (which serves only to generate the .o files) and reopen it without -fobject-code, so that the reload of BugA turns it into an interpreted module._______________________________________________
On 30/06/2026 13:53, George Colpitts wrote:
fwiw I can't duplicate on MacOS 26.5.2 and ghc 9.12.5 rc2:
ghci -fobject-code
Loaded package environment from /Users/gcolpitts/.ghc/aarch64-darwin-9.12.4.20260614/environments/default
GHCi, version 9.12.4.20260614: https://www.haskell.org/ghc/ :? for help
Loaded GHCi configuration from /Users/gcolpitts/.ghci
λ> :load BugC
[1 of 3] Compiling BugA ( BugA.hs, BugA.o )
[2 of 3] Compiling BugB ( BugB.hs, BugB.o )
[3 of 3] Compiling BugC ( BugC.hs, BugC.o )
Ok, three modules loaded.
(0.41 secs,)
λ> bug
ld: warning: duplicate -rpath '/opt/homebrew/Cellar/gcc/15.2.0_1/lib/gcc/current/gcc/aarch64-apple-darwin25/15' ignored
ld: warning: -U option is redundant when using -undefined dynamic_lookup
13
it :: ()
(3.58 secs, 70,664 bytes)
λ> :r
[1 of 3] Compiling BugA ( BugA.hs, BugA.o ) [Source file changed]
Ok, three modules reloaded.
λ> bug
ld: warning: duplicate -rpath '/opt/homebrew/Cellar/gcc/15.2.0_1/lib/gcc/current/gcc/aarch64-apple-darwin25/15' ignored
ld: warning: -U option is redundant when using -undefined dynamic_lookup
14
it :: ()
(0.34 secs, 67,952 bytes)
On Tue, Jun 30, 2026 at 4:31 AM Evan Laforge <qdunkan@gmail.com> wrote:
On Tue, Jun 23, 2026 at 10:48 AM Evan Laforge <qdunkan@gmail.com> wrote:
>
> On Tue, Jun 23, 2026 at 6:44 AM Zubin Duggal <zubin@well-typed.com> wrote:
> > Which platform/OS are you building on and how did you obtain
> > GHC?
>
> Oh I should have mentioned, it's OSX, 26.5.1. Obtained via ghcup, and
> using the "ghcup" channel rather than vanilla.
>
> However, I just tested this with linux on a GCP VM and ghc 9.10.3 and
> I still see the issue. One thing, I see in your non-reproduction that
> it says "[1 of 3] Compiling BugA ( BugA.hs, BugA.o )",
> which implies -fobject-code is still on. The bug only seems to happen
> when you are in bytecode mode, but there are .o files available to
> load, so you'd have to restart ghci without -fobject-code.
Hate to nag but... has anyone managed to reproduce it? I can make it
happen on linux and OSX, and I can verify that it doesn't happen in
9.2.8, and that it starts happening at 9.4. I believe this is when
ghc got a new recompilation avoidance mechanism that was supposed to
use hashes instead of mtimes, so that's my guess about what introduced
it.
I guess I can go ahead and file a bug on gitlab now. I'm pretty sure
now it's a bug so I guess I don't need to wait for someone else to
repro but it would be nice to verify...
Since permanently leaving on -fobject-code seems to be a workaround
and processors are so fast now, I may just leave that flag on now.
I'm surprised more people haven't run into this problem in the years
since 9.4.
_______________________________________________
Haskell-Cafe mailing list -- haskell-cafe@haskell.org
To (un)subscribe, modify options or view archives go to:
Only members subscribed via the mailman list are allowed to post.
_______________________________________________ Haskell-Cafe mailing list -- haskell-cafe@haskell.org To (un)subscribe, modify options or view archives go to: Only members subscribed via the mailman list are allowed to post.
Haskell-Cafe mailing list -- haskell-cafe@haskell.org
To (un)subscribe, modify options or view archives go to:
Only members subscribed via the mailman list are allowed to post.