Re: Haskell compilation issues

2019-05-19 Thread Jordan Geoghegan



On 5/19/19 1:24 PM, Matthias Kilian wrote:

On Sun, May 19, 2019 at 12:18:44AM -0500, Joe Nelson wrote:

Matthias Kilian wrote:

ps: please note that I'm not subscribed to misc@ with my 'real'
mail account, only with a crappy gmail account I'm only reading on
my tablet (from which I forwarded your mail to my real address). So
better cc' me if you've any other questions ;-)

FYI, the way you replied to the original message broke the reply chain
in my mail reader (Mutt). You should include an "In-Reply-To" message
header that references the Message-ID of the mail to which you are
replying. I know it might be a little tricky from your tablet setup, but
wanted to bring it to your attention if you weren't aware.

I'm very well aware of it, and I've a really smart solution for the
problem: I'll never ever even try to give some helpful answer to
any of the mails on misc@



No need to get all triggered, the guy is just giving you a heads up.



Re: Haskell compilation issues

2019-05-19 Thread Matthias Kilian
On Sun, May 19, 2019 at 12:18:44AM -0500, Joe Nelson wrote:
> Matthias Kilian wrote:
> > ps: please note that I'm not subscribed to misc@ with my 'real'
> > mail account, only with a crappy gmail account I'm only reading on
> > my tablet (from which I forwarded your mail to my real address). So
> > better cc' me if you've any other questions ;-)
> 
> FYI, the way you replied to the original message broke the reply chain
> in my mail reader (Mutt). You should include an "In-Reply-To" message
> header that references the Message-ID of the mail to which you are
> replying. I know it might be a little tricky from your tablet setup, but
> wanted to bring it to your attention if you weren't aware.

I'm very well aware of it, and I've a really smart solution for the
problem: I'll never ever even try to give some helpful answer to
any of the mails on misc@



Re: Haskell compilation issues

2019-05-19 Thread Joe Nelson
Matthias Kilian wrote:
> I've a really smart solution for the problem: I'll never ever even try
> to give some helpful answer to any of the mails on misc@

Sorry, my message must have sounded snarky. I didn't intend it that
way. Honestly just wanted to help you with your email setup. It can be
complicated, and I've only recently learned about some of this stuff
myself.

Maybe I should have replied off-list originally, but thought the mail
header tip might be useful for other people as well.



Re: Haskell compilation issues

2019-05-18 Thread Joe Nelson
Matthias Kilian wrote:
> ps: please note that I'm not subscribed to misc@ with my 'real'
> mail account, only with a crappy gmail account I'm only reading on
> my tablet (from which I forwarded your mail to my real address). So
> better cc' me if you've any other questions ;-)

FYI, the way you replied to the original message broke the reply chain
in my mail reader (Mutt). You should include an "In-Reply-To" message
header that references the Message-ID of the mail to which you are
replying. I know it might be a little tricky from your tablet setup, but
wanted to bring it to your attention if you weren't aware.

In your particular case it would have been:

In-Reply-To: 




Re: Haskell compilation issues

2019-05-18 Thread Joe Nelson
Omar Polo wrote:
> What I think it's required to compile and run haskell program is to
> wxallow the partition. If you're using the standard layout the /tmp
> and /home should be wxallowed.

Yep, GHC creates binaries with W^X violations. The GHC developers are
working on this problem in [0], but for now Haskell binaries have to be
run from a filesystem mounted as wxallowed.

0: https://gitlab.haskell.org/ghc/ghc/issues/14069



Re: Haskell compilation issues

2019-05-10 Thread Omar Polo
On Fri, May 10, 2019 at 02:50:49PM +, Kaleta wrote:
> Hello,
> I'm trying to start a little haskell project for the first time in a few 
> months.
> This is the first time I'm trying to run ghc on OpenBSD
> I'm not sure what ghc's problem is, I've pasted the error message below along 
> with the version of ld and dmesg
> 
> I'm pretty sure that this is an openbsd problem. The only "fix" I was able to 
> find was this: https://gitlab.haskell.org/ghc/ghc/issues/8825
> However, setting the locale had no effect.
> I have also copied the version of ghc and the output of locale below.
> 
> I appreciate any kind of help.
> 
> --- ghc output ---
> [1 of 1] Compiling Main ( Main.hs, Main.o )
> Linking Main ...

It's been a while since I've worked in haskell on OpenBSD but, for what
I recall, this

> : error:
> Warning: Couldn't figure out linker information!
>  Make sure you're using GNU ld, GNU gold or the built in OS X 
> linker, etc.

should not matter (don't know if it's relevant on 6.5 though.)

What I think it's required to compile and run haskell program is to
wxallow the partition. If you're using the standard layout the /tmp and
/home should be wxallowed.

Hope it helps!

PS: I read somewhere a guy that did some fancy things in order to not
wxallow /home, something like linking directory from /usr/local to the
user home, but I don't recall now, nor I remember if it was actually
"safe".

> --- ghc -v output ---
> Glasgow Haskell Compiler, Version 8.2.2, stage 2 booted by GHC version 
> 8.2.2.20180330
> Using binary package database: /usr/local/lib/ghc/package.conf.d/package.cache
> package flags []
> loading package database /usr/local/lib/ghc/package.conf.d
> wired-in package ghc-prim mapped to ghc-prim-0.5.1.1
> wired-in package integer-gmp mapped to integer-gmp-1.0.1.0
> wired-in package base mapped to base-4.10.1.0
> wired-in package rts mapped to rts
> wired-in package template-haskell mapped to template-haskell-2.12.0.0
> wired-in package ghc mapped to ghc-8.2.2
> wired-in package dph-seq not found.
> wired-in package dph-par not found.
> *** Deleting temp files:
> Deleting:
> *** Deleting temp dirs:
> Deleting:
> ghc: no input files
> Usage: For basic information, try the `--help' option.
> 
> --- ld -v output ---
> LLD 7.0.1 (compatible with GNU linkers)
> 
> --- locale output ---
> LANG=
> LC_COLLATE="C"
> LC_CTYPE=en_US.UTF-8
> LC_MONETARY="C"
> LC_NUMERIC="C"
> LC_TIME="C"
> LC_MESSAGES="C"
> LC_ALL=
> 
> --- dmesg ---
> OpenBSD 6.5 (GENERIC.MP) #3: Sat Apr 13 14:48:43 MDT 2019
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 4156157952 (3963MB)
> avail mem = 4020568064 (3834MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xdae9c000 (65 entries)
> bios0: vendor LENOVO version "8DET55WW (1.25 )" date 11/01/2011
> bios0: LENOVO 42912XG
> acpi0 at bios0: rev 2
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP SLIC SSDT SSDT SSDT HPET APIC MCFG ECDT ASF! TCPA 
> SSDT SSDT UEFI UEFI UEFI
> acpi0: wakeup devices LID_(S3) SLPB(S3) IGBE(S4) EXP4(S4) EXP7(S4) EHC1(S3) 
> EHC2(S3) HDEF(S4)
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpihpet0 at acpi0: 14318179 Hz
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: Intel(R) Core(TM) i5-2540M CPU @ 2.60GHz, 2591.95 MHz, 06-2a-07
> cpu0: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
> cpu0: 256KB 64b/line 8-way L2 cache
> cpu0: smt 0, core 0, package 0
> mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
> cpu0: apic clock running at 99MHz
> cpu0: mwait min=64, max=64, C-substates=0.2.1.1.2, IBE
> cpu1 at mainbus0: apid 1 (application processor)
> cpu1: Intel(R) Core(TM) i5-2540M CPU @ 2.60GHz, 2591.59 MHz, 06-2a-07
> cpu1: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
> cpu1: 256KB 64b/line 8-way L2 cache
> cpu1: smt 1, core 0, package 0
> cpu2 at mainbus0: apid 2 (application processor)
> cpu2: Intel(R) Core(TM) i5-2540M CPU @ 2.60GHz, 2591.58 MHz, 06-2a-07
> cpu2: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,M

Re: Haskell compilation issues

2019-05-10 Thread Matthias Kilian
Hi,

> Hello,
> I'm trying to start a little haskell project for the first time in a few
> months.
> This is the first time I'm trying to run ghc on OpenBSD
> I'm not sure what ghc's problem is, I've pasted the error message below
> along with the version of ld and dmesg
> 
> I'm pretty sure that this is an openbsd problem.

It's more a problem of ghc (8.2) trying to make guesses about the
installed toolchain in a way that doesn't work correctly on OpenBSD.

> The only "fix" I was able
> to find was this: https://gitlab.haskell.org/ghc/ghc/issues/8825
> However, setting the locale had no effect.
> I have also copied the version of ghc and the output of locale below.
> 
> I appreciate any kind of help.
> 
> --- ghc output ---
> [1 of 1] Compiling Main ( Main.hs, Main.o )
> Linking Main ...
> 
> : error:
> Warning: Couldn't figure out linker information!
>  Make sure you're using GNU ld, GNU gold or the built in OS X 
> linker, etc.

That error isn't an error but just a warning which gets misinterpreted
by (probably) the ghc driver. If you check the exit code of ghc,
you'll notice that it's 0. And if you ls -l, you'll see a perfect
'Main' executable.

I think this should be fixed in ghc-8.6, but I can't check it now,
because I managed to brick my build machine. I hope to fix it next
monday and continue to work on a update of our ghc port.

Ciao,
Kili

ps: please note that I'm not subscribed to misc@ with my 'real'
mail account, only with a crappy gmail account I'm only reading on
my tablet (from which I forwarded your mail to my real address). So
better cc' me if you've any other questions ;-)



Haskell compilation issues

2019-05-10 Thread Kaleta
Hello,
I'm trying to start a little haskell project for the first time in a few months.
This is the first time I'm trying to run ghc on OpenBSD
I'm not sure what ghc's problem is, I've pasted the error message below along 
with the version of ld and dmesg

I'm pretty sure that this is an openbsd problem. The only "fix" I was able to 
find was this: https://gitlab.haskell.org/ghc/ghc/issues/8825
However, setting the locale had no effect.
I have also copied the version of ghc and the output of locale below.

I appreciate any kind of help.

--- ghc output ---
[1 of 1] Compiling Main ( Main.hs, Main.o )
Linking Main ...

: error:
Warning: Couldn't figure out linker information!
 Make sure you're using GNU ld, GNU gold or the built in OS X 
linker, etc.

--- ghc -v output ---
Glasgow Haskell Compiler, Version 8.2.2, stage 2 booted by GHC version 
8.2.2.20180330
Using binary package database: /usr/local/lib/ghc/package.conf.d/package.cache
package flags []
loading package database /usr/local/lib/ghc/package.conf.d
wired-in package ghc-prim mapped to ghc-prim-0.5.1.1
wired-in package integer-gmp mapped to integer-gmp-1.0.1.0
wired-in package base mapped to base-4.10.1.0
wired-in package rts mapped to rts
wired-in package template-haskell mapped to template-haskell-2.12.0.0
wired-in package ghc mapped to ghc-8.2.2
wired-in package dph-seq not found.
wired-in package dph-par not found.
*** Deleting temp files:
Deleting:
*** Deleting temp dirs:
Deleting:
ghc: no input files
Usage: For basic information, try the `--help' option.

--- ld -v output ---
LLD 7.0.1 (compatible with GNU linkers)

--- locale output ---
LANG=
LC_COLLATE="C"
LC_CTYPE=en_US.UTF-8
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_MESSAGES="C"
LC_ALL=

--- dmesg ---
OpenBSD 6.5 (GENERIC.MP) #3: Sat Apr 13 14:48:43 MDT 2019
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4156157952 (3963MB)
avail mem = 4020568064 (3834MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xdae9c000 (65 entries)
bios0: vendor LENOVO version "8DET55WW (1.25 )" date 11/01/2011
bios0: LENOVO 42912XG
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SLIC SSDT SSDT SSDT HPET APIC MCFG ECDT ASF! TCPA SSDT 
SSDT UEFI UEFI UEFI
acpi0: wakeup devices LID_(S3) SLPB(S3) IGBE(S4) EXP4(S4) EXP7(S4) EHC1(S3) 
EHC2(S3) HDEF(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5-2540M CPU @ 2.60GHz, 2591.95 MHz, 06-2a-07
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1.2, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i5-2540M CPU @ 2.60GHz, 2591.59 MHz, 06-2a-07
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: Intel(R) Core(TM) i5-2540M CPU @ 2.60GHz, 2591.58 MHz, 06-2a-07
cpu2: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 1, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Core(TM) i5-2540M CPU @ 2.60GHz, 2591.59 MHz, 06-2a-07
cpu3: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
acpimcfg0 at acpi0
acpimcfg0: addr 0xf800, bus 0-63
acpiec0 at acpi0
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG_)