Custom Query (7507 matches)


Show under each result:

Results (4 - 6 of 7507)

1 2 3 4 5 6 7 8 9 10 11 12
Ticket Resolution Summary Owner Reporter
#8741 fixed `System.Directory.getPermissions` fails on read-only filesystem AlainODea hvr

Alain O'Dea reports in an email that:

Prelude> System.Directory.getPermissions "/usr/bin/ld"
*** Exception: /usr/bin/ld: fileAccess: permission denied (Read-only file system)

That seems wrong.

An access(*, W_OK) syscall by design should return EROFS on a read-only file system by specification.

This breaks Cabal on SmartOS since /usr is read-only by design and Cabal calls getPermissions "/usr/bin/ld".

#8921 fixed ghc-stage2 fails with ld: fatal: library -lrt: not found on topHandler02(profthreaded) test AlainODea AlainODea

On SmartOS ghc-stage2 crashes with an error when trying to run the topHandler02(dyn) test: ld: fatal: library -lrt: not found

Tracing this with the following DTrace script to stop ghc-stage2 at the point of launching ld:


#!/usr/sbin/dtrace -s

#pragma D option destructive

/copyinstr(arg0) == "/usr/bin/ld"/
    system("pargs %d", pid);

This let me observe the command-line arguments to ld:

In ssh session A I started DTrace:

chmod +x ~/exit_on_ld.d

In a ssh session B I started the topHandler02(dyn) test manually with no output redirection:

cd ~/ghc/libraries/base/tests && '/root/ghc/inplace/bin/ghc-stage2' -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-db -rtsopts -fno-ghci-history -o topHandler02 topHandler02.hs -O -prof -static -auto-all -threaded

In ssh session A I observed the ld call (ghc-stage2 is now frozen by stop):

CPU     ID                    FUNCTION:NAME
  3   5167                      exece:entry     9186691866:     /opt/local/gcc47/libexec/gcc/x86_64-sun-solaris2.11/4.7.3/collect2 -R/opt/local
argv[0]: /opt/local/gcc47/libexec/gcc/x86_64-sun-solaris2.11/4.7.3/collect2
argv[1]: -R/opt/local/lib/
argv[2]: -Y
argv[3]: P,/lib/amd64:/usr/lib/amd64:/opt/local/lib/
argv[4]: -Qy
argv[5]: -o
argv[6]: topHandler02.o
argv[7]: -L/opt/local/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.3
argv[8]: -L/opt/local/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.3/../../../../x86_64-sun-solaris2.11/lib/amd64
argv[9]: -L/opt/local/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.3/../../../amd64
argv[10]: -L/lib/amd64
argv[11]: -L/usr/lib/amd64
argv[12]: -L/opt/local/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.3/../../../../x86_64-sun-solaris2.11/lib
argv[13]: -L/opt/local/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.3/../../..
argv[14]: -R/opt/local/gcc47/x86_64-sun-solaris2.11/lib/amd64
argv[15]: -R/opt/local/gcc47/lib/amd64
argv[16]: -lrt
argv[17]: -r
argv[18]: /tmp/ghc91814_0/ghc91814_6.o
argv[19]: /tmp/ghc91814_0/ghc91814_5.o

I was then able to run them in isolation with GHC's temp files present on disk:

# /opt/local/gcc47/libexec/gcc/x86_64-sun-solaris2.11/4.7.3/collect2 -R/opt/local/lib/ -Y P,/lib/amd64:/usr/lib/amd64:/opt/local/lib/ -Qy -o topHandler02.o -L/opt/local/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.3 -L/opt/local/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.3/../../../../x86_64-sun-solaris2.11/lib/amd64 -L/opt/local/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.3/../../../amd64 -L/lib/amd64 -L/usr/lib/amd64 -L/opt/local/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.3/../../../../x86_64-sun-solaris2.11/lib -L/opt/local/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.3/../../.. -R/opt/local/gcc47/x86_64-sun-solaris2.11/lib/amd64 -R/opt/local/gcc47/lib/amd64 -lrt -r /tmp/ghc91814_0/ghc91814_6.o /tmp/ghc91814_0/ghc91814_5.o
ld: fatal: library -lrt: not found
ld: fatal: file processing errors. No output written to topHandler02.o
collect2: error: ld returned 1 exit status

If I omit -lrt from the arguments it succeeds (on Illumos-based systems, including SmartOS, librt is a passthrough to libc):

# /opt/local/gcc47/libexec/gcc/x86_64-sun-solaris2.11/4.7.3/collect2 -R/opt/local/lib/ -Y P,/lib/amd64:/usr/lib/amd64:/opt/local/lib/ -Qy -o topHandler02.o -L/opt/local/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.3 -L/opt/local/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.3/../../../../x86_64-sun-solaris2.11/lib/amd64 -L/opt/local/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.3/../../../amd64 -L/lib/amd64 -L/usr/lib/amd64 -L/opt/local/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.3/../../../../x86_64-sun-solaris2.11/lib -L/opt/local/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.3/../../.. -R/opt/local/gcc47/x86_64-sun-solaris2.11/lib/amd64 -R/opt/local/gcc47/lib/amd64 -r /tmp/ghc91814_0/ghc91814_6.o /tmp/ghc91814_0/ghc91814_5.o
# echo $?

No errors are emitted and the exit code is 0 (good).

I would like to conditionally omit -lrt from the ld arguments.

Where do I need to look for where ghc-stage2 populates the arguments to ld?

#676 fixed Write a performance checker for collections. Alson Kemp jpbernardy

Addition of new collection types demand a way to check their performances consistently.

1 2 3 4 5 6 7 8 9 10 11 12
Note: See TracQuery for help on using queries.