<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">seems you are using ghc for different architecture:<div class=""><div class="">bmaxa@Branimirs-Air ~ % brew search ghc</div><div class="">==> Formulae</div><div class="">ghc ✔ ghc@8.6 ghc@8.8 ghc@9 gh ghq ghi ghz ghr grc gcc ✔ shc</div><div class=""><br class=""></div><div class="">If you meant "ghc" specifically:</div><div class="">It was migrated from homebrew/cask to homebrew/core.</div><div class="">bmaxa@Branimirs-Air ~ % ghc -v</div><div class="">Glasgow Haskell Compiler, Version 8.10.7, stage 2 booted by GHC version 8.10.7</div><div class="">*** initializing package database:</div><div class="">Using binary package database: /opt/homebrew/Cellar/ghc/8.10.7/lib/ghc-8.10.7/package.conf.d/package.cache</div><div class="">package flags []</div><div class="">loading package database /opt/homebrew/Cellar/ghc/8.10.7/lib/ghc-8.10.7/package.conf.d</div><div class="">wired-in package ghc-prim mapped to ghc-prim-0.6.1</div><div class="">wired-in package integer-wired-in mapped to integer-gmp-1.0.3.0</div><div class="">wired-in package base mapped to base-4.14.3.0</div><div class="">wired-in package rts mapped to rts</div><div class="">wired-in package template-haskell mapped to template-haskell-2.16.0.0</div><div class="">wired-in package ghc mapped to ghc-8.10.7</div><div class="">!!! initializing package database: finished in 10.92 milliseconds, allocated 8.308 megabytes</div><div class=""><br class=""></div><div class="">Greetings, Branimir.</div><div class=""><br class=""></div><div><br class=""><blockquote type="cite" class=""><div class="">On 21.09.2021., at 22:47, Geraldus <<a href="mailto:heraldhoi@gmail.com" class="">heraldhoi@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi, dear Cafe!<div class=""><br class=""></div><div class="">I'm having trouble compiling an application which uses PostgreSQL on a macbook with an M1 chip. </div><div class=""><br class=""></div><div class="">Postgre itself seems to work fine. It is installed via `homebrew` (if I'm not mistaken this is the only way on Mac to get pg_config, which is required for `persistent-postgresql`). The error message is following: </div><div class=""><br class=""></div><div class="">```</div><div class=""><font face="monospace" class="">persistent-postgresql> <command line>: dlopen(/Users/arthurfayzrakhmanov/.stack/snapshots/x86_64-osx/36432054bd8d13c1da6134758733286b536c65d34222dcf10ecb29bd437c8117/8.10.7/lib/x86_64-osx-ghc-8.10.7/libHSpostgresql-libpq-0.9.4.3-GrxZELytXmSAOH6lAioiw9-ghc8.10.7.dylib, 5): <b class="">Symbol not found: _PQclear</b><br class="">persistent-postgresql> Referenced from: /Users/arthurfayzrakhmanov/.stack/snapshots/x86_64-osx/36432054bd8d13c1da6134758733286b536c65d34222dcf10ecb29bd437c8117/8.10.7/lib/x86_64-osx-ghc-8.10.7/libHSpostgresql-libpq-0.9.4.3-GrxZELytXmSAOH6lAioiw9-ghc8.10.7.dylib<br class="">persistent-postgresql> <b class="">Expected in: flat namespace</b><br class="">persistent-postgresql> in /Users/arthurfayzrakhmanov/.stack/snapshots/x86_64-osx/36432054bd8d13c1da6134758733286b536c65d34222dcf10ecb29bd437c8117/8.10.7/lib/x86_64-osx-ghc-8.10.7/libHSpostgresql-libpq-0.9.4.3-GrxZELytXmSAOH6lAioiw9-ghc8.10.7.dylib</font><br class=""></div><div class="">```</div><div class=""><br class=""></div><div class="">The minimal setup to reproduce is following: </div><div class=""><br class=""></div><div class="">```</div><div class=""><font face="monospace" class="">dependencies:<br class="">- base >= 4.7 && < 5<br class="">- persistent >= 2.13.1.2 && < 3<br class="">- persistent-postgresql >= 2.13.1.0 && < 3</font><br class=""></div><div class="">```</div><div class=""><br class=""></div><div class="">Digging around gave me just a few clues. It seems that `libpq` I have is compiled some other way it expected, and missing some symbols required `persistent-postgresql` to work. I believe this is not a bug, rather that a local configuration issue. </div><div class=""><br class=""></div><div class="">Does anyone know which is right setup to build persistent-postgresql on Macs with M1 chip? Thanks in advance.</div><div class=""><br class=""></div><div class="">Sincerely. </div><div class="">Arthur.</div><div class=""><br class=""></div><div class="">P.S. Please apologize if this is not a right place to ask such questions. Asked already in Yesod Google Groups and Stack Overflow. But didn't received any feedback.</div></div>
_______________________________________________<br class="">Haskell-Cafe mailing list<br class="">To (un)subscribe, modify options or view archives go to:<br class=""><a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" class="">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br class="">Only members subscribed via the mailman list are allowed to post.</div></blockquote></div><br class=""></div></body></html>