{"action":"created","issue":{"url":"https://api.github.com/repos/ghcjs/ghcjs/issues/347","labels_url":"https://api.github.com/repos/ghcjs/ghcjs/issues/347/labels{/name}","comments_url":"https://api.github.com/repos/ghcjs/ghcjs/issues/347/comments","events_url":"https://api.github.com/repos/ghcjs/ghcjs/issues/347/events","html_url":"https://github.com/ghcjs/ghcjs/issues/347","id":77974506,"number":347,"title":"hsc2hs passes -R flags to linker on Darwin","user":{"login":"pikajude","id":316117,"avatar_url":"https://avatars.githubusercontent.com/u/316117?v=3","gravatar_id":"","url":"https://api.github.com/users/pikajude","html_url":"https://github.com/pikajude","followers_url":"https://api.github.com/users/pikajude/followers","following_url":"https://api.github.com/users/pikajude/following{/other_user}","gists_url":"https://api.github.com/users/pikajude/gists{/gist_id}","starred_url":"https://api.github.com/users/pikajude/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pikajude/subscriptions","organizations_url":"https://api.github.com/users/pikajude/orgs","repos_url":"https://api.github.com/users/pikajude/repos","events_url":"https://api.github.com/users/pikajude/events{/privacy}","received_events_url":"https://api.github.com/users/pikajude/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-19T07:30:08Z","updated_at":"2015-05-30T18:57:01Z","closed_at":null,"body":"This is during my attempt to build `network` with ghcjs and nix:\r\n\r\n```\r\n[stuff...]\r\nsh ./configure --with-compiler=ghcjs --prefix=/nix/store/2mxbw2f3yra7dn17jhdfirc5l4madx3y-haskell-network-2.6.1.0 --libdir=$prefix/lib/$compiler --with-gcc=/nix/store/bw23y2h9w9mgai6ank3vh03qrbxfgras-clang-wrapper-3.6.0/bin/clang\r\nconfigure: WARNING: unrecognized options: --with-compiler, --with-gcc\r\nchecking build system type... x86_64-apple-darwin14.3.0\r\nchecking host system type... x86_64-apple-darwin14.3.0\r\nchecking for gcc... clang\r\nchecking whether the C compiler works... yes\r\nchecking for C compiler default output file name... a.out\r\nchecking for suffix of executables...\r\nchecking whether we are cross compiling... no\r\nchecking for suffix of object files... o\r\nchecking whether we are using the GNU C compiler... yes\r\nchecking whether clang accepts -g... yes\r\nchecking for clang option to accept ISO C89... none needed\r\nchecking for an ANSI C-conforming const... yes\r\nchecking how to run the C preprocessor... clang -E\r\nchecking for grep that handles long lines and -e... /nix/store/i3axi6vjl44zq0zj1qj2wny5fp9dvfy2-gnugrep-2.21/bin/grep\r\nchecking for egrep... /nix/store/i3axi6vjl44zq0zj1qj2wny5fp9dvfy2-gnugrep-2.21/bin/grep -E\r\nchecking for ANSI C header files... yes\r\nchecking for sys/types.h... yes\r\nchecking for sys/stat.h... yes\r\nchecking for stdlib.h... yes\r\nchecking for string.h... yes\r\nchecking for memory.h... yes\r\nchecking for strings.h... yes\r\nchecking for inttypes.h... yes\r\nchecking for stdint.h... yes\r\nchecking for unistd.h... yes\r\nchecking fcntl.h usability... yes\r\nchecking fcntl.h presence... yes\r\nchecking for fcntl.h... yes\r\nchecking limits.h usability... yes\r\nchecking limits.h presence... yes\r\nchecking for limits.h... yes\r\nchecking for stdlib.h... (cached) yes\r\nchecking for sys/types.h... (cached) yes\r\nchecking for unistd.h... (cached) yes\r\nchecking winsock2.h usability... no\r\nchecking winsock2.h presence... no\r\nchecking for winsock2.h... no\r\nchecking ws2tcpip.h usability... no\r\nchecking ws2tcpip.h presence... no\r\nchecking for ws2tcpip.h... no\r\nchecking arpa/inet.h usability... yes\r\nchecking arpa/inet.h presence... yes\r\nchecking for arpa/inet.h... yes\r\nchecking netdb.h usability... yes\r\nchecking netdb.h presence... yes\r\nchecking for netdb.h... yes\r\nchecking netinet/in.h usability... yes\r\nchecking netinet/in.h presence... yes\r\nchecking for netinet/in.h... yes\r\nchecking netinet/tcp.h usability... yes\r\nchecking netinet/tcp.h presence... yes\r\nchecking for netinet/tcp.h... yes\r\nchecking sys/socket.h usability... yes\r\nchecking sys/socket.h presence... yes\r\nchecking for sys/socket.h... yes\r\nchecking sys/uio.h usability... yes\r\nchecking sys/uio.h presence... yes\r\nchecking for sys/uio.h... yes\r\nchecking sys/un.h usability... yes\r\nchecking sys/un.h presence... yes\r\nchecking for sys/un.h... yes\r\nchecking linux/can.h usability... no\r\nchecking linux/can.h presence... no\r\nchecking for linux/can.h... no\r\nchecking net/if.h usability... yes\r\nchecking net/if.h presence... yes\r\nchecking for net/if.h... yes\r\nchecking for readlink... yes\r\nchecking for symlink... yes\r\nchecking for if_nametoindex... yes\r\nchecking for struct msghdr.msg_control... yes\r\nchecking for struct msghdr.msg_accrights... no\r\nchecking for struct sockaddr.sa_len... yes\r\nchecking for in_addr_t in netinet/in.h... yes\r\nchecking for SO_PEERCRED and struct ucred in sys/socket.h... no\r\nchecking for getpeereid in unistd.h... checking for getpeereid... yes\r\nchecking for _head_libws2_32_a in -lws2_32... no\r\nchecking for getaddrinfo... yes\r\nchecking for gai_strerror... yes\r\nchecking whether AI_ADDRCONFIG is declared... yes\r\nchecking whether AI_ALL is declared... yes\r\nchecking whether AI_NUMERICSERV is declared... yes\r\nchecking whether AI_V4MAPPED is declared... yes\r\nchecking whether IPV6_V6ONLY is declared... yes\r\nchecking whether IPPROTO_IP is declared... yes\r\nchecking whether IPPROTO_TCP is declared... yes\r\nchecking whether IPPROTO_IPV6 is declared... yes\r\nchecking for sendfile in sys/sendfile.h... no\r\nchecking for sendfile in sys/socket.h... yes\r\nchecking for gethostent... yes\r\nchecking for accept4... no\r\nconfigure: creating ./config.status\r\nconfig.status: creating network.buildinfo\r\nconfig.status: creating include/HsNetworkConfig.h\r\nconfig.status: include/HsNetworkConfig.h is unchanged\r\nconfigure: WARNING: unrecognized options: --with-compiler, --with-gcc\r\nReading parameters from ./network.buildinfo\r\nbuilding\r\nBuilding network-2.6.1.0...\r\nPreprocessing library network-2.6.1.0...\r\nld: unknown option: -R\r\nclang-3.6: error: linker command failed with exit code 1 (use -v to see invocation)\r\nlinking dist/build/Network/BSD_hsc_make.o failed (exit code 1)\r\ncommand was: /nix/store/bw23y2h9w9mgai6ank3vh03qrbxfgras-clang-wrapper-3.6.0/bin/clang dist/build/Network/BSD_hsc_make.o dist/build/Network/BSD_hsc_utils.o -o dist/build/Network/BSD_hsc_make -m64 -L/nix/store/2qg6apjimdrv1kwfw0abpir59xj7pmp0-ghcjs-0.1.0/lib/ghcjs-0.1.0/unix-2.7.1.0 -Wl,-R,/nix/store/2qg6apjimdrv1kwfw0abpir59xj7pmp0-ghcjs-0.1.0/lib/ghcjs-0.1.0/unix-2.7.1.0 -L/nix/store/2qg6apjimdrv1kwfw0abpir59xj7pmp0-ghcjs-0.1.0/lib/ghcjs-0.1.0/time-1.5.0.1 -Wl,-R,/nix/store/2qg6apjimdrv1kwfw0abpir59xj7pmp0-ghcjs-0.1.0/lib/ghcjs-0.1.0/time-1.5.0.1 -L/nix/store/2qg6apjimdrv1kwfw0abpir59xj7pmp0-ghcjs-0.1.0/lib/ghcjs-0.1.0/bytestring-0.10.6.0 -Wl,-R,/nix/store/2qg6apjimdrv1kwfw0abpir59xj7pmp0-ghcjs-0.1.0/lib/ghcjs-0.1.0/bytestring-0.10.6.0 -L/nix/store/2qg6apjimdrv1kwfw0abpir59xj7pmp0-ghcjs-0.1.0/lib/ghcjs-0.1.0/deepseq-1.4.1.1 -Wl,-R,/nix/store/2qg6apjimdrv1kwfw0abpir59xj7pmp0-ghcjs-0.1.0/lib/ghcjs-0.1.0/deepseq-1.4.1.1 -L/nix/store/2qg6apjimdrv1kwfw0abpir59xj7pmp0-ghcjs-0.1.0/lib/ghcjs-0.1.0/array-0.5.1.0 -Wl,-R,/nix/store/2qg6apjimdrv1kwfw0abpir59xj7pmp0-ghcjs-0.1.0/lib/ghcjs-0.1.0/array-0.5.1.0 -L/nix/store/2qg6apjimdrv1kwfw0abpir59xj7pmp0-ghcjs-0.1.0/lib/ghcjs-0.1.0/base-4.8.0.0 -Wl,-R,/nix/store/2qg6apjimdrv1kwfw0abpir59xj7pmp0-ghcjs-0.1.0/lib/ghcjs-0.1.0/base-4.8.0.0 -liconv -lcharset -L/nix/store/2qg6apjimdrv1kwfw0abpir59xj7pmp0-ghcjs-0.1.0/lib/ghcjs-0.1.0/integer-gmp-0.5.1.0 -L/nix/store/wk0vxlca4di6yn883c5hsria5a3c5ss3-gmp-5.1.3/lib -Wl,-R,/nix/store/2qg6apjimdrv1kwfw0abpir59xj7pmp0-ghcjs-0.1.0/lib/ghcjs-0.1.0/integer-gmp-0.5.1.0 -Wl,-R,/nix/store/wk0vxlca4di6yn883c5hsria5a3c5ss3-gmp-5.1.3/lib -lgmp -L/nix/store/2qg6apjimdrv1kwfw0abpir59xj7pmp0-ghcjs-0.1.0/lib/ghcjs-0.1.0/ghc-prim-0.4.0.0 -Wl,-R,/nix/store/2qg6apjimdrv1kwfw0abpir59xj7pmp0-ghcjs-0.1.0/lib/ghcjs-0.1.0/ghc-prim-0.4.0.0 -L/nix/store/2qg6apjimdrv1kwfw0abpir59xj7pmp0-ghcjs-0.1.0/lib/ghcjs-0.1.0/rts -Wl,-R,/nix/store/2qg6apjimdrv1kwfw0abpir59xj7pmp0-ghcjs-0.1.0/lib/ghcjs-0.1.0/rts -lm -ldl\r\nbuilder for ‘/nix/store/3in99xzl4r2fn64w1cb8g03q50y93qh1-haskell-network-2.6.1.0.drv’ failed with exit code 1\r\n```"},"comment":{"url":"https://api.github.com/repos/ghcjs/ghcjs/issues/comments/107075745","html_url":"https://github.com/ghcjs/ghcjs/issues/347#issuecomment-107075745","issue_url":"https://api.github.com/repos/ghcjs/ghcjs/issues/347","id":107075745,"user":{"login":"luite","id":354096,"avatar_url":"https://avatars.githubusercontent.com/u/354096?v=3","gravatar_id":"","url":"https://api.github.com/users/luite","html_url":"https://github.com/luite","followers_url":"https://api.github.com/users/luite/followers","following_url":"https://api.github.com/users/luite/following{/other_user}","gists_url":"https://api.github.com/users/luite/gists{/gist_id}","starred_url":"https://api.github.com/users/luite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luite/subscriptions","organizations_url":"https://api.github.com/users/luite/orgs","repos_url":"https://api.github.com/users/luite/repos","events_url":"https://api.github.com/users/luite/events{/privacy}","received_events_url":"https://api.github.com/users/luite/received_events","type":"User","site_admin":false},"created_at":"2015-05-30T18:57:01Z","updated_at":"2015-05-30T18:57:01Z","body":"Hmm, might have something to do with the nix environment, it builds ok on OS X in a plain Cabal sandbox (although it's completely unsupported at the moment, some JS glue code is necessary to make network connections actually work). How can I reproduce this issue?"}}