Re: 1.2.0 build.sh error : OpenBSD AMD64

2020-04-12 Thread lbart
You could take a lot at our [FreeBSD 
ports](https://svnweb.freebsd.org/ports/head/lang/nim/) we patch nim.cfg to use 
clang (and some minor changes to match with our installation)


Re: 1.2.0 build.sh error : OpenBSD AMD64

2020-04-08 Thread leorize
You might find this interesting: 
[https://github.com/nim-lang/Nim/pull/12105](https://github.com/nim-lang/Nim/pull/12105)


Re: 1.2.0 build.sh error : OpenBSD AMD64

2020-04-08 Thread q7r7
Could someone please help make this change (add the cc = clang to build.sh and 
nim.cfg openbsd lines) as described above?

I thought I'd do it as a pull request at 
[https://github.com/nim-lang/Nim](https://github.com/nim-lang/Nim) but I don't 
see where it would go. (Sorry!)

I've also put through the request for OpenBSD to add 1.2.0 to Ports/Packages.


Re: 1.2.0 build.sh error : OpenBSD AMD64

2020-04-08 Thread q7r7
No need for the old-GCC patch. Instead just have OpenBSD builds use clang. It 
worked!


$ bin/nim --version
Nim Compiler Version 1.2.0 [OpenBSD: amd64]
Compiled at 2020-04-03
Copyright (c) 2006-2020 by Andreas Rumpf
git hash: 7e83adff84be5d0c401a213eccb61e321a3fb1ff
active boot switches: -d:release


Run

** build.sh ** added line 92:


  *openbsd* )
myos="openbsd"
CC="clang"


Run

**config /nim.cfg** added line 202:


@if freebsd or openbsd or netbsd:
  cc = clang


Run

That's all it took! Works great.


Re: 1.2.0 build.sh error : OpenBSD AMD64

2020-04-08 Thread miran
> I'm not sure if it is in 1.2

It is.


Re: 1.2.0 build.sh error : OpenBSD AMD64

2020-04-08 Thread rayman22201
For GCC versions < 5, you must add the -d:nimEmulateOverflowChecks switch.

I'm not sure how to do it with buil_all.sh

Adding it to koch directly works well.


./Koch -d:release -d:nimEmulateOverflowChecks boot


Run

> [https://github.com/nim-lang/Nim/pull/13692](https://github.com/nim-lang/Nim/pull/13692)


Re: 1.2.0 build.sh error : OpenBSD AMD64

2020-04-08 Thread q7r7
… and this is the clang version in OpenBSD 6.7-BETA:

OpenBSD clang version 8.0.1 (tags/RELEASE_801/final) (based on LLVM 8.0.1) 
Target: amd64-unknown-openbsd6.7 Thread model: posix InstalledDir: /usr/bin

I hope that helps. Thanks for looking into it. Sorry I don't know how to help 
more directly.


Re: 1.2.0 build.sh error : OpenBSD AMD64

2020-04-08 Thread q7r7
This is the default on the newest OpenBSD 6.7-BETA :

gcc (GCC) 4.2.1 20070719 


Re: 1.2.0 build.sh error : OpenBSD AMD64

2020-04-08 Thread mratsim
What's the gcc version?

This is a builtin introduced in GCC7 
[https://gcc.gnu.org/onlinedocs/gcc/Integer-Overflow-Builtins.html](https://gcc.gnu.org/onlinedocs/gcc/Integer-Overflow-Builtins.html)
 and Clang 4 (?). Not sure if it has been backported.

We might need a switch for old GCCs.


1.2.0 build.sh error : OpenBSD AMD64

2020-04-08 Thread q7r7
Building current Nim 1.2.0 on OpenBSD AMD64. I'm hoping to get Nim 1.2 included 
into OpenBSD packages.

But when I run build.sh, it eventually dies with this error:

ld: error: undefined symbol: __builtin_saddll_overflow

It seems to be from the end of c_code/nimbase.h

Here's the full context: 
[https://gist.github.com/sivers/a9786ddcca4d2f0f9feb497d13f2311a](https://gist.github.com/sivers/a9786ddcca4d2f0f9feb497d13f2311a)

If anyone can suggest a patch, I'm happy to help test to get this working.