builtin sort
nazriel
spam at dzfl.pl
Mon Jun 10 08:25:47 PDT 2013
On Saturday, 8 June 2013 at 08:30:54 UTC, Stephan Schiffels wrote:
> Hi,
>
> I know it has been discussed previously to deprecate the
> builtin sort. I don't know the status of this, but I observed
> the following problem.
>
> With dmd, druntime and phobos all on 2.063, this program runs
> successfully on a mac:
>
> #!/usr/bin/env rdmd
>
> import std.stdio;
>
> void main() {
>
> int[] a = [5, 4, 3, 2, 1];
>
> a.sort;
> writeln(a);
>
> }
>
> But it fails on linux, with the line:
>
>
> /nfs/users/nfs_s/ss27/Software/dlang/phobos/generated/linux/release/64/libphobos2.a(qsort_4c4_2cc.o):
> In function `_adSort':
> src/rt/qsort.d:(.text._adSort+0x47): undefined reference to
> `qsort_r'
> collect2: ld returned 1 exit status
> --- errorlevel 1
>
>
> When I change "a.sort" -> "a.sort()" and add import
> std.algorithm everything works fine.
> Does this mean that the builtin sort on Linux is broken with
> 2.063?
>
> Stephan
Maybe it is related to
https://github.com/D-Programming-Language/druntime/pull/427
More information about the Digitalmars-d
mailing list