neko_coreutils-8.12 in beta - sort is broken

If you're coding on or porting to IRIX, this is the forum for discussion.
mrthinlysliced
Posts: 43
Joined: Mon May 14, 2018 9:21 am
Location: Colchester. UK

neko_coreutils-8.12 in beta - sort is broken

Post by mrthinlysliced » Sat May 26, 2018 6:17 am

FYI the "sort" utility in the gnu coreutils package neko_coreutils-8.12 is broken.

e.g.

Code: Select all

[dan@leafy ~]$ /usr/nekoware/bin/sort -n -k 1
/usr/nekoware/bin/sort: invalid number at field start: invalid count at start of `1'
I don't know if the other pieces under there are ok - but at the least this causes untold problems when building perl.

What is the process for voting out or approving packages, for that matter?

Mr TS.

User avatar
Trippynet
Posts: 55
Joined: Sat Dec 23, 2017 12:46 pm
Location: Aberdeen, Scotland, UK

Re: neko_coreutils-8.12 in beta - sort is broken

Post by Trippynet » Sat May 26, 2018 9:43 am

Used to be on Nekochan that you simply posted to the release thread and either gave it a thumbs up, or thumbs down. After 3 thumbs-up, it was moved to current if memory serves.
:Indigo2_IMP: R10000 195MHz, 384MB RAM, SolidIMPACT, 36GB 15k & 300GB 10k drives, new/quiet fans, IRIX 6.5.22
:Fuelb: R14000 600MHz, 4GB RAM, V10 Graphics, 72GB 15k & 300GB 10k drives, new/quiet fans, IRIX 6.5.30
:O2: in storage...

User avatar
dexter1
Posts: 68
Joined: Thu May 24, 2018 9:30 am
Location: Zoetermeer, The Netherlands

Re: neko_coreutils-8.12 in beta - sort is broken

Post by dexter1 » Sat May 26, 2018 11:55 am

The neko_coreutils.txt contains a list of package builders, so you could get into contact with whoever built it. Alternatively, try an older coreutils from /current

User avatar
Raion-Fox
Founder
Posts: 199
Joined: Fri Nov 17, 2017 12:23 am
Location: Virginia
Contact:

Re: neko_coreutils-8.12 in beta - sort is broken

Post by Raion-Fox » Sat May 26, 2018 1:46 pm

Nekoware is mirrored here for historical reasons. We will be discussing the virtues of a newer package distribution when the time comes, one that can fix the issues with nekoware.
You are free to talk about changes you'd like to make however any radical changes to the package structure is not going to be approved because this is being deprecated
I'm the manager

Besides irix.cc, I run these sites:

projectkitsune.com

kazuo.io

User avatar
vishnu
Posts: 44
Joined: Fri Dec 08, 2017 2:05 pm
Location: Minneapolis, MN USA

Re: neko_coreutils-8.12 in beta - sort is broken

Post by vishnu » Sun May 27, 2018 1:30 am

Raion-Fox wrote:however any radical changes to the package structure is not going to be approved because this is being deprecated
Uh, what now? The package structure will still be tardists, right? Or did I miss something... :?
Project: Temporarily lost at sea
Plan: World domination! Or something...

User avatar
Raion-Fox
Founder
Posts: 199
Joined: Fri Nov 17, 2017 12:23 am
Location: Virginia
Contact:

Re: neko_coreutils-8.12 in beta - sort is broken

Post by Raion-Fox » Sun May 27, 2018 1:55 am

The package structure will, of course, be tardists.

The main things I've got on the table:

Using either /opt/local or /usr/local for consistency of PATH with scripting on other UNIXes.
Making a script that anyone, with a basic irix install, can fetch, install the necessary environment, scripts and utilities and fetch packages remotely.
Providing some level of dependency resolution, probably through a python/perl script of some kind.
Focusing on a certain scope of software that's buildable, maintainable etc. Nothing that we can't keep maintained as a community.
Packages will be tracked based on LTS/backported ports to reduce community overhead.
Providing patches for people who want to bootstrap the entire environment.

I'd also like to see if we can join up with the Solaris guys or another, larger, vintage community and try to maintain a reasonable browser to allow safe and secure web browsing on these machines.
I'm the manager

Besides irix.cc, I run these sites:

projectkitsune.com

kazuo.io

mrthinlysliced
Posts: 43
Joined: Mon May 14, 2018 9:21 am
Location: Colchester. UK

Re: neko_coreutils-8.12 in beta - sort is broken

Post by mrthinlysliced » Sun May 27, 2018 6:37 am

I see. In all honesty I'm not expecting previous makers/builders of this package to provide any support correcting/fixing the package - this was mainly just to let others know "don't rely on that package, there's lurking issues".

Since the topic seems to have started here a little - for any "packaging-next" procedure I'll add some thoughts of my own if I may .-)

* The packaging/buildbot infrastructure should be automated and checked in to some version control package (my vote for git)

* Any manual intervention in building a package is a blocker - all packages should be re-buildable without any console interaction

* The package downloading / package repository store should use some protocol that allows people to come and go in terms of donating bandwidth and restrict net activity to some limit (just an example, but torrents have these nice properties) - in an ideal world this shouldn't have to run on Irix, either - I'd donate bandwidth from a RPI

User avatar
Raion-Fox
Founder
Posts: 199
Joined: Fri Nov 17, 2017 12:23 am
Location: Virginia
Contact:

Re: neko_coreutils-8.12 in beta - sort is broken

Post by Raion-Fox » Sun May 27, 2018 12:12 pm

We'll discuss it more of course, thanks for your suggestions
I'm the manager

Besides irix.cc, I run these sites:

projectkitsune.com

kazuo.io

User avatar
dexter1
Posts: 68
Joined: Thu May 24, 2018 9:30 am
Location: Zoetermeer, The Netherlands

Re: neko_coreutils-8.12 in beta - sort is broken

Post by dexter1 » Sat Jun 23, 2018 4:08 pm

FWIW, i'm in the process of rebuilding coreutils and i have made a patch file and build instructions.
This is the patch file coreutils-8.29_irix.patch

Code: Select all

--- ./src/blake2/blake2.h.save	Thu Jun 21 01:10:31 2018
+++ ./src/blake2/blake2.h	Thu Jun 21 01:28:23 2018
@@ -20,6 +20,8 @@
 
 #if defined(_MSC_VER)
 #define BLAKE2_PACKED(x) __pragma(pack(push, 1)) x __pragma(pack(pop))
+#elif defined(__sgi)
+#define BLAKE2_PACKED(x) x
 #else
 #define BLAKE2_PACKED(x) x __attribute__((packed))
 #endif
@@ -86,6 +88,9 @@
     size_t        outlen;
   } blake2bp_state;
 
+#if defined (__sgi)
+#pragma pack(1)
+#endif
 
   BLAKE2_PACKED(struct blake2s_param__
   {
@@ -103,8 +108,16 @@
     uint8_t  personal[BLAKE2S_PERSONALBYTES];  /* 32 */
   });
 
+#if defined (__sgi)
+#pragma pack(0)
+#endif
+
   typedef struct blake2s_param__ blake2s_param;
 
+#if defined (__sgi)
+#pragma pack(1)
+#endif
+
   BLAKE2_PACKED(struct blake2b_param__
   {
     uint8_t  digest_length; /* 1 */
@@ -120,6 +133,10 @@
     uint8_t  salt[BLAKE2B_SALTBYTES]; /* 48 */
     uint8_t  personal[BLAKE2B_PERSONALBYTES];  /* 64 */
   });
+
+#if defined (__sgi)
+#pragma pack(0)
+#endif
 
   typedef struct blake2b_param__ blake2b_param;
 
--- ./src/blake2/blake2-impl.h.save	Thu Jun 21 19:39:24 2018
+++ ./src/blake2/blake2-impl.h	Thu Jun 21 19:40:33 2018
@@ -19,7 +19,7 @@
 #include <string.h>
 
 #if !defined(__cplusplus) && (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L)
-  #if   defined(_MSC_VER)
+  #if   defined(_MSC_VER) | defined(__sgi)
     #define BLAKE2_INLINE __inline
   #elif defined(__GNUC__)
     #define BLAKE2_INLINE __inline__
--- ./src/blake2/b2sum.c.save	Fri Jun 22 22:33:54 2018
+++ ./src/blake2/b2sum.c	Fri Jun 22 22:34:56 2018
@@ -13,6 +13,10 @@
    https://blake2.net.
 */
 
+#if defined (__sgi)
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
--- ./lib/gettimeofday.c.save	Thu Jun 21 00:23:28 2018
+++ ./lib/gettimeofday.c	Thu Jun 21 00:23:59 2018
@@ -20,9 +20,8 @@
 #include <config.h>
 
 /* Specification.  */
-#include <sys/time.h>
-
 #include <time.h>
+#include <sys/time.h>
 
 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
 # define WINDOWS_NATIVE
--- ./lib/gethrxtime.c.save	Wed Jun 20 23:58:20 2018
+++ ./lib/gethrxtime.c	Wed Jun 20 23:58:41 2018
@@ -24,6 +24,7 @@
 
 #if ! (HAVE_ARITHMETIC_HRTIME_T && HAVE_DECL_GETHRTIME)
 
+#include <time.h>
 #include <sys/time.h>
 #include "timespec.h"
 
--- ./Makefile.in.save	Sat Jun 23 12:32:03 2018
+++ ./Makefile.in	Sat Jun 23 12:31:32 2018
@@ -4759,7 +4759,7 @@
 src_sha384sum_CPPFLAGS = -DHASH_ALGO_SHA384=1 $(AM_CPPFLAGS)
 src_sha512sum_SOURCES = src/md5sum.c
 src_sha512sum_CPPFLAGS = -DHASH_ALGO_SHA512=1 $(AM_CPPFLAGS)
-@USE_XLC_INCLUDE_FALSE@src_b2sum_CPPFLAGS = -include config.h \
+@USE_XLC_INCLUDE_FALSE@src_b2sum_CPPFLAGS = -Ilib \
 @USE_XLC_INCLUDE_FALSE@	-DHASH_ALGO_BLAKE2=1 $(AM_CPPFLAGS)
 # Include the file on the command line to avoid modifying
 # the blake2 upstream source
Using MIPSPro 7.4.4 and these environment variables:

Code: Select all

patch -p0 < coreutils-8.29_irix.patch

setenv CC c99
setenv MAKE /usr/nekoware/bin/gmake
setenv PERL /usr/nekoware/bin/perl
setenv CFLAGS '-O2 -mips4 -n32 -diag_error 1035'
setenv LDFLAGS '-L/usr/nekoware/lib'
setenv CPPFLAGS '-I/usr/nekoware/include'
setenv PATH /usr/nekoware/bin:$PATH

./configure --prefix=/usr/nekoware --with-openssl --disable-rpath --with-libiconv-prefix=/usr/nekoware --program-prefix=g
A gmake and recent perl is necessary to build and test it. Some unittests still fail, but sort seems to work. This needs more work though.

mrthinlysliced
Posts: 43
Joined: Mon May 14, 2018 9:21 am
Location: Colchester. UK

Re: neko_coreutils-8.12 in beta - sort is broken

Post by mrthinlysliced » Tue Jun 26, 2018 3:00 am

Hey Dexter,

I'd spotted the special casing for the pack macro, but handn't put the SGI equivalent pragma in place -> nice.

If it's any use, the patch I'm using for core utils is here (sorry, SGI patch style):

https://github.com/danielhams/didbs/blo ... rsgi.patch

Two bits I don't see in your patch:

(1) Use of math.h in seq.c -> The macro tests for inf and nan fail, so I included math.h to use the library versions - this stops make check running forever on the misc/seq test

(2) A tweak to numfmt.c so it doesn't try to use fpsetprec if it isn't defined (irix seems to have the ieee header but doesn't define fpsetprec?)

The package still fails a number of tests:

https://github.com/danielhams/didbs/blo ... /knownbugs

I am taking a look at these but they take time. Still don't know how to get past the "argument list to long" failure later in make check. (systune ncargs is 50000, fwiw).

Current one: seq seems to support 0xF23EF style parameters on linux - on irix this test fails.

Post Reply