Nekochan Net

Official Chat Channel: #nekochan // irc.nekochan.net
It is currently Wed Jul 30, 2014 7:11 am

All times are UTC - 8 hours


Forum rules


Any posts concerning pirated software or offering to buy/sell/trade commercial software are subject to removal.



Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next
Author Message
Unread postPosted: Thu Aug 31, 2006 4:34 am 
Offline
User avatar

Joined: Mon Aug 23, 2004 4:37 pm
Posts: 911
Location: Cambridge, UK
For a whie now, I've been running pkgsrc from NetBSD on IRIX to build packages from scratch, thus ensuring that they're fully optimised for my machine.

I'll record the necessary changes in this thread, so that anyone who's interested can also play with pkgsrc without lots of head=scratching and problems.


Last edited by stuart on Sun Oct 08, 2006 2:39 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: mk.conf
Unread postPosted: Thu Aug 31, 2006 4:43 am 
Offline
User avatar

Joined: Mon Aug 23, 2004 4:37 pm
Posts: 911
Location: Cambridge, UK
First up, my mk.conf. I have this in /usr/bsd/etc/, and a symlink pointing here in /etc.

These settings configure pkgsrc to exist in /usr/bsd/src, owned by netbsd:netbsd. Running pkgsrc as a non-root user is a great idea when used as a secondary package manager, to ensure that no OS files can be overwritten - although pkgsrc is actually very good at ensuring that this doesn't happen.

(I also changed the permissions on /usr/bsd to netbsd:sys, so that the necessary top-level directories can be created)

Code:
.ifdef BSD_PKG_MK       # begin pkgsrc settings

OPSYS=                  IRIX
ABI=                    32
PKGSRC_COMPILER=        mipspro

IMAKEOPTS+=             -DBuildN32 -DSgiISA32=4

UNPRIVILEGED=           YES
UNPRIVILEGED_USER=      netbsd
UNPRIVILEGED_GROUP=     netbsd
BINOWN=                 netbsd
BINGRP=                 netbsd
ROOT_USER=              netbsd
ROOT_GROUP=             netbsd
SHAREOWN=               netbsd
SHAREGRP=               netbsd
CHOWN=                  true
CHGRP=                  true

LOCALBASE=              /usr/bsd
VARBASE=                ${LOCALBASE}/var
X11BASE=                /usr
PKGMANDIR=              man

PKG_DBDIR=              ${VARBASE}/db/pkg
WRKOBJDIR=              ${VARBASE}/tmp
INSTALL=                ${LOCALBASE}/bin/install-sh
FETCH_CMD=              ${LOCALBASE}/bin/ftp
RCD_SCRIPTS_DIR=        ${PKG_SYSCONFBASEDIR}/rc.d

PKGVULNDIR=             ${LOCALBASE}/src/distfiles
PKGREPOSITORY=          ${VARBASE}/tmp
PKG_SUFX=               .tbz

#USE_TOOLS=             no

PKG_TOOLS_BIN=          ${LOCALBASE}/sbin

TOOLS_PLATFORM.install?=${LOCALBASE}/bin/install-sh
TOOLS_PLATFORM.awk?=    ${LOCALBASE}/bin/gawk
TOOLS_PLATFORM.sed?=    ${LOCALBASE}/bin/gnu-sed
TOOLS_PLATFORM.pax?=    ${LOCALBASE}/bin/pax
TOOLS_PLATFORM.tar?=    ${LOCALBASE}/bin/gnu-tar
TOOLS_PLATFORM.mtree?=  ${LOCALBASE}/sbin/mtree

AWK=                    ${LOCALBASE}/bin/gawk
CMP=                    ${LOCALBASE}/bin/cmp
ECHO=                   ${LOCALBASE}/bin/echo
EXPR=                   ${LOCALBASE}/bin/expr
FGREP=                  ${LOCALBASE}/bin/fgrep
FIND=                   ${LOCALBASE}/bin/find
GREP=                   ${LOCALBASE}/bin/grep
PAX=                    ${LOCALBASE}/bin/pax
SED=                    ${LOCALBASE}/bin/sed
SETENV=                 ${LOCALBASE}/bin/env
SORT=                   ${LOCALBASE}/bin/sort

#SED=                   ${LOCALBASE}/bin/nbsed

TMPDIR=                 ${VARBASE}/tmp

CDROM_PKG_URL_DIR=      /CDROM

# pkgsrc build options:
# Update options
NOCLEAN=                YES
REINSTALL=              YES
# Clean options
CLEANDEPENDS=           YES

#PKGSRC_MESSAGE_RECIPIENTS?=    netbsd
#PKGSRC_RUN_TEST?=      YES

PASSIVE_FETCH=          YES
FAILOVER_FETCH=         YES
MASTER_SORT=            .ac.uk .co.uk .org.uk .net .com .org
SETGIDGAME?=            YES
SMART_MESSAGES=         YES

DEFAULT_SERIAL_DEVICE=  /dev/ttyd1

ACCEPTABLE_LICENSES+=   IDEA-licence
ACCEPTABLE_LICENSES+=   ms-ttf-license
ACCEPTABLE_LICENSES+=   no-commercial-use

# Use flags:
DEFANG_USER?=           nobody
DEFANG_GROUP?=          nogroup

GNU_PROGRAM_PREFIX?=    gnu-
KRB5_PREFIX?=           k
USE_INET6?=             YES

PAPERSIZE=              A4

PKG_JVM=                sun-jdk14
PKG_JVM_DEFAULT=        sun-jdk14
PKG_JAVA_HOME=          /usr/java2

PKG_DEFAULT_OPTIONS+=    arping1
PKG_DEFAULT_OPTIONS+=    freetype
PKG_DEFAULT_OPTIONS+=    inet6
PKG_DEFAULT_OPTIONS+=    x11

PKG_OPTIONS.aalib+=      ncurses slang
PKG_OPTIONS.allegro+=    esound
PKG_OPTIONS.gaim+=       audio gnutls -gtkspell -nas perl -silc tcl
PKG_OPTIONS.gawk+=       portals
PKG_OPTIONS.gkrellm+=    ssl
PKG_OPTIONS.gqmpeg+=    -gqmpeg-japanese -gqmpeg-russian
PKG_OPTIONS.heimdal+=    kerberos-prefix-cmds
PKG_OPTIONS.libmikmod+=  esound
PKG_OPTIONS.perl+=      -threads
PKG_OPTIONS.pinfo+=      pinfo-native-curses
PKG_OPTIONS.scummvm+=   -x11
PKG_OPTIONS.SDL+=       -arts -nas
PKG_OPTIONS.smpeg+=      gtk-player opengl-player
PKG_OPTIONS.vim+=        cscope

#.if exists(${LOCALBASE}/bin/dfdisk)
#FETCH_CMD=             ${LOCALBASE}/bin/dfdisk fetch
#.endif

.endif                  # end pkgsrc settings


Note that the PKG_OPTIONS only cover packages I've actually installed, and that the Java related stuff doesn't work just yet...

Also note that the TOOLS_PLATFORM and command settings should be commented out until these binaries actually exist!


Top
 Profile  
 
 Post subject: netbsd User
Unread postPosted: Thu Aug 31, 2006 4:53 am 
Offline
User avatar

Joined: Mon Aug 23, 2004 4:37 pm
Posts: 911
Location: Cambridge, UK
Next up, create a "netbsd" user and group. I set the user's home to /usr/bsd/src (e.g. the pkgsrc root directory) with bash (3.1, compiled from source manually with GCC to ensure that it's not broken) as the defautl shell.

In their home directory, this user then has the following .bashrc (and a corresponding .bash_profile entry to source it):

Code:
# For pkgsrc usage, set initial environment...

PS1="\u@\h \w # "
export PS1

alias vi='DISPLAY="" vim'
alias ls='ls --color=auto -hF'
alias grep='grep --colour'

PAGER=less
export PAGER

FTP_PASSIVE=1
export FTP_PASSIVE

sysman="/usr/catman:/usr/share/man:/usr/share/catman"
optman="/opt/man:/opt/modules/2.2.2.5/man"
sgiman=" /usr/freeware/catman:/var/sgi_apache/server/man"

bsdman="/usr/bsd/catman:/usr/bsd/man:/usr/bsd/lib/perl5/man:/usr/bsd/lib/perl5/site_perl/man:/usr/bsd/lib/perl5/vendor_perl/man"
nekoman="/usr/nekoware/man:/usr/nekoware/ssl/man"
gentooman="/usr/gentoo/man"

localman="/usr/local/man:/usr/local/games/bzflag-1.10.7/man"

MANPATH="$bsdman:$sysman:$optman:$sgiman:$nekoman:$gentooman:$localman"
export MANPATH

unset sysman optman sgiman bsdman nekoman gentooman localman zeusman

MANFMTCMD="groff -Tascii -man"
export MANFMTCMD

PATH="/usr/bsd/sbin:/usr/bsd/bin:/usr/freeware/sbin:/usr/gnu/bin:/usr/freeware/bin:/usr/bsd:/usr/sbin:$PATH"
export PATH

XAPPLRESDIR=/usr/bsd/lib/X11/app-defaults
export XAPPLRESDIR

PKGSRCDIR=/usr/bsd/src
export PKGSRCDIR

common="-O2 -n32 -mips4 -r14000 -apo -float_const -use_readonly_const -TARG:isa=mips4:platform=ip30:processor=r14000 -TENV:zeroinit_in_bss=ON -OPT:fast_io=ON:Olimit=8192:reorg_common=ON:swp=ON -LNO:auto_dist=ON:fusion_peeling_limit=8:gather_scatter=2 -woff 1174,1183,1185,1552,3970,3968"

bsdcompat="-D_BSD_COMPAT"
bsdfull="-D_BSD_TYPES -D_BSD_TIME" # -D_BSD_SIGNALS : Breaks use of <sigaction.h>

namespace="-LANG:exceptions=OFF:libc_in_namespace_std=OFF"

CC=cc
# Using "c99" as the C compiler ensures C99 mode,
# but breaks libtool.
#CC=c99
CXX=CC

CPPFLAGS="-I/usr/bsd/include"
CFLAGS="-c99 $common"
CXXFLAGS="$common -FE:eliminate_duplicate_inline_copies:template_in_elf_section $namespace"
LDFLAGS="-Wl,-v -Wl,-s -Wl,-x -n32 -mips4 -rdata_shared -Wl,-allow_jump_at_eop -Wl,-rpath,/usr/bsd/lib"
export CC CXX CPPFLAGS CFLAGS CXXFLAGS LDFLAGS

unset common bsdcompat bsdfull namespace

NOWARN="-woff 1009,1014,1110,1116,1185,1188,1204,1230,1233 -Wl,-woff,85,-woff,84"
export NOWARN

LD_LIBRARY_PATH=/usr/lib
LD_LIBRARYN32_PATH=/usr/lib32:/usr/bsd/lib:/usr/gnu/lib
LD_LIBRARY64_PATH=/usr/lib64
export LD_LIBRARY_PATH LD_LIBRARYN32_PATH LD_LIBRARY64_PATH

TMP=/usr/bsd/var/tmp
TEMP=$TMP
export TMP TEMP

alias pkgdep="pkgdep -I $PKGSRCDIR/INDEX"
alias pkg_info="pkg_info -K /usr/bsd/var/db/pkg"

# set vi:nowrap


Note that, with this script in place, man pages won't work until groff is installed. Without it, on the other hand, some man pages won't render at all.

The netbsd user then has the following crontab:

Code:
#
# Update NetBSD/pkgsrc and its vulnerabilities list
#
5       5       *       *       *       [ -x /usr/bsd/bin/cvs ] && ( cd /usr/bsd/src && CVSROOT="anoncvs@anoncvs.netbsd.org:/cvsroot" CVS_RSH="ssh" /usr/bsd/bin/cvs -q update -dP ; )
0       6       *       *       *       [ -x /usr/bsd/sbin/download-vulnerability-list ] && /usr/bsd/sbin/download-vulnerability-list >/dev/null 2>&1
5       6       *       *       *       [ -x /usr/bsd/sbin/audit-packages ] && /usr/bsd/sbin/audit-packages
6       6       *       *       *       [ -x /usr/bsd/sbin/pkg_chk ] && PATH="/usr/bsd/bin:/usr/bsd/sbin:$PATH" PKGSRCDIR="/usr/bsd/src" /usr/bsd/sbin/pkg_chk -sun 2>&1

# set vi:nowrap


Top
 Profile  
 
 Post subject: Patches
Unread postPosted: Thu Aug 31, 2006 5:10 am 
Offline
User avatar

Joined: Mon Aug 23, 2004 4:37 pm
Posts: 911
Location: Cambridge, UK
Once the pkgsrc distribution has been downloaded, the following patches need to be applied.

To ensure that the work/.buildlink directories have both lib and lib32 directories:
Code:
--- mk/buildlink3/bsd.buildlink3.mk.dist        2006-08-27 00:09:45.845085881 +0100
+++ mk/buildlink3/bsd.buildlink3.mk     2006-08-27 00:11:51.032943401 +0100
@@ -486,8 +486,10 @@
        ${_PKG_SILENT}${_PKG_DEBUG}${RM} -f ${BUILDLINK_X11_DIR}
        ${_PKG_SILENT}${_PKG_DEBUG}${LN} -sf ${BUILDLINK_DIR} ${BUILDLINK_X11_DIR}
 .endif
+       ${_PKG_SILENT}${_PKG_DEBUG}${LN} -sf ${BUILDLINK_DIR} ${BUILDLINK_DIR}/bsd
        ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${BUILDLINK_DIR}/include
        ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${BUILDLINK_DIR}/lib${LIBABISUFFIX}
+       ${_PKG_SILENT}${_PKG_DEBUG}${LN} -sf ${BUILDLINK_DIR}/lib${LIBABISUFFIX} ${BUILDLINK_DIR}/lib
 
 # The following variables are all optionally defined and control which
 # package files are symlinked into ${BUILDLINK_DIR} and how their names


It's a little noisy, but to prevent subtle parsing errors:
Code:
--- mk/tools/tools.IRIX.mk.dist 2006-08-27 00:20:33.388323401 +0100
+++ mk/tools/tools.IRIX.mk      2006-08-31 14:05:11.740552720 +0100
@@ -3,7 +3,12 @@
 # System-supplied tools for the IRIX operating system.
 
 TOOLS_PLATFORM.[?=             [                       # shell builtin
-TOOLS_PLATFORM.awk?=           /usr/bin/nawk
+#TOOLS_PLATFORM.awk?=          /usr/bin/nawk
+.if exists(/usr/gnu/bin/gawk)
+TOOLS_PLATFORM.awk?=           /usr/gnu/bin/gawk
+.else
+TOOLS_PLATFORM.awk?=           /usr/freeware/bin/gawk
+.endif
 TOOLS_PLATFORM.basename?=      /sbin/basename
 TOOLS_PLATFORM.cat?=           /sbin/cat
 TOOLS_PLATFORM.chgrp?=         /sbin/chgrp


To fix many instances where configure can't find a C++ preprocessor:
Code:
--- mk/compiler.mk.dist 2006-08-27 00:07:33.194539401 +0100
+++ mk/compiler.mk      2006-08-27 00:01:54.501870921 +0100
@@ -174,7 +174,8 @@
 .endif
 .if empty(USE_LANGUAGES:Mc++)
 PKG_CXX:=              ${_FAIL_WRAPPER.CXX}
-ALL_ENV+=              CXXCPP=${CPP:Q} # to make some Autoconf scripts happy
+#ALL_ENV+=             CXXCPP=${CPP:Q} # to make some Autoconf scripts happy
+ALL_ENV+=              CXXCPP="CC -E"
 override-tools: ${_FAIL_WRAPPER.CXX}
 .endif
 .if empty(USE_LANGUAGES:Mfortran)


Add a missing include, mainly for building the INDEX file:
Code:
--- mk/endian.mk.dist   2006-08-27 00:13:23.456731081 +0100
+++ mk/endian.mk        2006-08-27 00:14:36.635545721 +0100
@@ -30,7 +30,8 @@
 .  endif
 
 MACHINE_ENDIAN!=                                                       \
-       { ${ECHO} "\#include <${_ENDIAN_H}>";                           \
+       { ${ECHO} "\#include <standards.h>";                            \
+         ${ECHO} "\#include <${_ENDIAN_H}>";                           \
          ${ECHO} "\#ifndef BYTE_ORDER";                                \
          ${ECHO} "\#ifdef _BIG_ENDIAN";                                \
          ${ECHO} "\#define BYTE_ORDER 4321";                           \


... and finally, make sure that we don't try to check what OS we're on without first including the platform-specific files:
Code:
--- mk/oss.buildlink3.mk.dist   2006-08-27 00:15:37.773963081 +0100
+++ mk/oss.buildlink3.mk        2006-08-27 00:16:30.285935881 +0100
@@ -35,6 +35,7 @@
 
 .if !empty(OSS_BUILDLINK3_MK:M+)
 LIBOSSAUDIO?=          ${BUILDLINK_LDADD.oss}
+.include "bsd.prefs.mk"
 .  if (${OPSYS} == "Linux") && exists(/dev/dsp)
 DEVOSSAUDIO?=          /dev/dsp
 DEVOSSSOUND?=          /dev/dsp


Some problems still remain which I've not been able to fix yet... there's a cosmetic issue where builds will output something along the lines of "work/.buildlink/wrapper/bin/cc[50]: Not found" a number of times, but this to be caused by a malformed logging statement in one of the pkgsrc .mk files, and doesn't look like anything serious.

More problematic is that meta-packages (which only pull in other real packages) don't work - they will always mis-detect that the first package they depend on is not present (even if it is), and will then rebuild it - but complain when it gets to the installation stage that the package is already present. This happens even if the dependant package is first uninstalled. This can also be worked around by simple installing the constituent packages and ignoring the meta-package, but this is messy.


Last edited by stuart on Thu Aug 31, 2006 6:48 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Packages
Unread postPosted: Thu Aug 31, 2006 6:31 am 
Offline
User avatar

Joined: Mon Aug 23, 2004 4:37 pm
Posts: 911
Location: Cambridge, UK
The are many packages which don't compile by default with MIPSpro on IRIX, many of which require only changes to the pkgsrc Makefile. This is especially true when building with the "-apo" Auto-parallelisation option, which causes binaries to addiitonally require being linked to libmp.so. This is often solved by adding:
Code:
LDFLAGS.IRIX+= -lmp
... to the Makefile. If this doesn't work, then:
Code:
LIBS.IRIX+= -lmp
... is worth a try.

A final note on APO - there are some things it just can't handle. If the build process faults with a segfault followed by an internal compiler error, then running the most recent invocation of $CC/$CXX again without APO, and it will succeed and the build can continue from where it left off - ghostscript-gnu is a good example of this. gtk2, on the other hand, will generate these faults for every object in the gdk subdirectory... in this case, removing all instances of "-apo" from the Makefile is much easier.

So far, I've found the following packages which won't build on IRIX/MIPSpro without source code changes:

devel/gettext
devel/gettext-tools
fonts/ttmkfdir2
net/ORBit2
archivers/zip
audio/flac
audio/gqmpeg
audio/speex
audio/vorbis-tools
chat/bitlbee
chat/gaim
graphics/freetype-lib
graphics/freetype-utils
lang/perl5
misc/pinfo
misc/watch
multimedia/libmpeg2
pkgtools/p5-pkgsrc-Dewey
print/ghostscript
security/gnutls
sysutils/findutils
sysutils/gnome-vfs2
textproc/libxml
x11/xterm

... and note that any version of bash3 built on MIPSpro will not work correctly - there's something in there which only likes GCC (the build will complete and bash will run, but some syntax will not be parsed correctly. For example, "echo $(( 3 + 4 ))" should output "7", not "4: command not found".


Top
 Profile  
 
 Post subject: devel/gettext
Unread postPosted: Thu Aug 31, 2006 6:41 am 
Offline
User avatar

Joined: Mon Aug 23, 2004 4:37 pm
Posts: 911
Location: Cambridge, UK
devel/gettext and devel/gettext-tools include a horrible macro which is GNU-specific, and then even more fragile tests to try to determine if you're using a compiler which doesn't like this (which seems, frankly, to be most of them - including Apple's GCC!)

I've tried to get this fixed, but the MIPSpro fix applied in-tree doesn't actually solve the problem (although possibly due to miscommunication on my part...)

The necessary patch to be applied after invoking "bmake patch" in the devel/gettext and devel/gettext-tools directories are:
Code:
--- work/gettext-0.14.6/gettext-tools/src/po-lex.c.dist 2006-08-31 15:33:19.927792640 +0100
+++ work/gettext-0.14.6/gettext-tools/src/po-lex.c      2006-08-26 21:12:36.337875040 +0100
@@ -66,14 +66,9 @@
 lex_pos_ty gram_pos;
 int gram_pos_column;
 
-
 /* Error handling during the parsing of a PO file.
    These functions can access gram_pos and gram_pos_column.  */
 
-#if !defined __sgi && !(__STDC__ && \
-      ((defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L && !defined __DECC) \
-       || (defined __GNUC__ && __GNUC__ >= 2 && !defined __APPLE_CC__)))
-
 /* CAUTION: If you change this function, you must also make identical
    changes to the macro of the same name in src/po-lex.h  */
 
@@ -132,9 +127,6 @@
     po_error (EXIT_FAILURE, 0, _("too many errors, aborting"));
 }
 
-#endif
-
-
 /* The lowest level of PO file parsing converts bytes to multibyte characters.
    This is needed
    1. for C compatibility: ISO C 99 section 5.1.1.2 says that the first


Code:
--- work/gettext-0.14.6/gettext-tools/src/po-lex.h.dist 2006-08-31 15:33:19.968316720 +0100
+++ work/gettext-0.14.6/gettext-tools/src/po-lex.h      2006-08-26 21:12:36.340589840 +0100
@@ -70,85 +70,8 @@
    Switch this on or off.  */
 extern void po_lex_pass_obsolete_entries (bool flag);
 
-
-/* ISO C 99 is smart enough to allow optimizations like this.
-   Note: OpenVMS 7.3 cc pretends to support ISO C 99 but chokes on '...'.  */
-#if __STDC__ && (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L && !defined __DECC)
-
-/* CAUTION: If you change this macro, you must also make identical
-   changes to the function of the same name in src/po-lex.c  */
-
-# define po_gram_error(fmt, ...)                                           \
-  do {                                                                     \
-    char *totalfmt = xasprintf ("%s%s", "%s:%lu:%d: ", fmt);               \
-    error_with_progname = false;                                           \
-    po_error (0, 0, totalfmt, gram_pos.file_name,                          \
-             (unsigned long) gram_pos.line_number, gram_pos_column + 1,    \
-             __VA_ARGS__ + 0);                                             \
-    error_with_progname = true;                                                    \
-    free (totalfmt);                                                       \
-    if (*fmt == '.')                                                       \
-      --error_message_count;                                               \
-    else if (error_message_count >= gram_max_allowed_errors)               \
-      po_error (1, 0, _("too many errors, aborting"));                     \
-  } while (0)
-
-/* CAUTION: If you change this macro, you must also make identical
-   changes to the function of the same name in src/po-lex.c  */
-
-# define po_gram_error_at_line(pos, fmt, ...)                              \
-  do {                                                                     \
-    error_with_progname = false;                                           \
-    po_error_at_line (0, 0, (pos)->file_name, (pos)->line_number,          \
-                     fmt, __VA_ARGS__ + 0);                                \
-    error_with_progname = true;                                                    \
-    if (*fmt == '.')                                                       \
-      --error_message_count;                                               \
-    else if (error_message_count >= gram_max_allowed_errors)               \
-      po_error (1, 0, _("too many errors, aborting"));                     \
-  } while (0)
-
-/* GCC is also smart enough to allow optimizations like this.  */
-#elif __STDC__ && defined __GNUC__ && __GNUC__ >= 2 && !defined __APPLE_CC__ \
-       && !defined __sgi
-
-/* CAUTION: If you change this macro, you must also make identical
-   changes to the function of the same name in src/po-lex.c  */
-
-# define po_gram_error(fmt, args...)                                       \
-  do {                                                                     \
-    char *totalfmt = xasprintf ("%s%s", "%s:%d:%d: ", fmt);                \
-    error_with_progname = false;                                           \
-    po_error (0, 0, totalfmt, gram_pos.file_name, gram_pos.line_number,            \
-             gram_pos_column + 1 , ## args);                               \
-    error_with_progname = true;                                                    \
-    free (totalfmt);                                                       \
-    if (*fmt == '.')                                                       \
-      --error_message_count;                                               \
-    else if (error_message_count >= gram_max_allowed_errors)               \
-      po_error (1, 0, _("too many errors, aborting"));                     \
-  } while (0)
-
-/* CAUTION: If you change this macro, you must also make identical
-   changes to the function of the same name in src/po-lex.c  */
-
-# define po_gram_error_at_line(pos, fmt, args...)                          \
-  do {                                                                     \
-    error_with_progname = false;                                           \
-    po_error_at_line (0, 0, (pos)->file_name, (pos)->line_number,          \
-                     fmt , ## args);                                       \
-    error_with_progname = true;                                                    \
-    if (*fmt == '.')                                                       \
-      --error_message_count;                                               \
-    else if (error_message_count >= gram_max_allowed_errors)               \
-      po_error (1, 0, _("too many errors, aborting"));                     \
-  } while (0)
-
-#else
 extern void po_gram_error (const char *fmt, ...);
 extern void po_gram_error_at_line (const lex_pos_ty *pos, const char *fmt, ...);
-#endif
-
 
 /* Contains information about the definition of one translation.  */
 struct msgstr_def


devel/gettext-asprintf also fails to build: The configure script strips "-LANG:exceptions=OFF:libc_in_namespace_std=OFF" from the supplied CXXFLAGS, the lack of which in turn prevents C++ code from seeing stdarg.h's va_list definition.

The cheating way to fix this is:
Code:
--- work/gettext-0.14.6/gettext-runtime/libasprintf/vasprintf.h.dist 2006-08-31 16:03:12.846440200 +0100
+++ work/gettext-0.14.6/gettext-runtime/libasprintf/vasprintf.h      2006-08-31 16:03:28.959791000 +0100
@@ -21,6 +21,7 @@
 
 /* Get va_list.  */
 #include <stdarg.h>
+typedef char *va_list;
 
 #ifndef __attribute__
 /* This feature is available in gcc versions 2.5 and later.  */


Top
 Profile  
 
 Post subject:
Unread postPosted: Thu Aug 31, 2006 1:36 pm 
Offline
User avatar

Joined: Sat Dec 18, 2004 8:21 am
Posts: 301
Location: Stockholm, Sweden
Add:
Code:
RANLIB=":"
export RANLIB


to the .bashrc for compability reasons... This way we make sure no "home-made" Makefiles won't stall due to trying calling ranlib.

TO your C(XX)FLAGS add
Code:
-D__inline__=inline

_________________
SGI Systems: R4K :Indigo:/256MB/XS-24, R5K 150MHz :Indy:/160MB/XL-24, R10K 175MHz :O2:/640MB, R12K 400MHz :Octane2:/Vpro6/1GB & R4K 250 MHz :Indigo2IMP:/128 MB/XZ Extreme/GIO64 FDDI

"It's a UNIX system! I know this! "


Top
 Profile  
 
 Post subject:
Unread postPosted: Thu Aug 31, 2006 2:29 pm 
Offline
User avatar

Joined: Sat Dec 18, 2004 8:21 am
Posts: 301
Location: Stockholm, Sweden
To get netpbm working do this:
Code:
1) install "cvs"
2)
cd /usr/pkgsrc/devel/netpbm
cvs update -dP -D20050801
bmake reinstall

_________________
SGI Systems: R4K :Indigo:/256MB/XS-24, R5K 150MHz :Indy:/160MB/XL-24, R10K 175MHz :O2:/640MB, R12K 400MHz :Octane2:/Vpro6/1GB & R4K 250 MHz :Indigo2IMP:/128 MB/XZ Extreme/GIO64 FDDI

"It's a UNIX system! I know this! "


Top
 Profile  
 
 Post subject:
Unread postPosted: Mon Sep 11, 2006 6:48 am 
Offline
User avatar

Joined: Sat Dec 18, 2004 8:21 am
Posts: 301
Location: Stockholm, Sweden
Add to mk.conf:

Code:
INCOMPAT_CURSES+=       IRIX-*-*


Improves compability with IRIX-curses-libs.

Adding:
Quote:
-D__inline__=inline
to your CFLAGS might improve compability too where __inline__ isn't redefined.

_________________
SGI Systems: R4K :Indigo:/256MB/XS-24, R5K 150MHz :Indy:/160MB/XL-24, R10K 175MHz :O2:/640MB, R12K 400MHz :Octane2:/Vpro6/1GB & R4K 250 MHz :Indigo2IMP:/128 MB/XZ Extreme/GIO64 FDDI

"It's a UNIX system! I know this! "


Top
 Profile  
 
 Post subject:
Unread postPosted: Mon Sep 11, 2006 8:56 am 
Offline
User avatar

Joined: Mon Aug 23, 2004 4:37 pm
Posts: 911
Location: Cambridge, UK
Nihilus wrote:
To get netpbm working do this:
Code:
2) cd /usr/pkgsrc/devel/netpbm cvs update -dP -D20050801


The latest working version of NetPBM is 10.29, from Makefile revision 1.125, 2005/09/20.

All of the 10.3x releases break because no pm_error symbol is defined.


Top
 Profile  
 
 Post subject:
Unread postPosted: Mon Sep 11, 2006 11:16 am 
Offline
User avatar

Joined: Sat Dec 18, 2004 8:21 am
Posts: 301
Location: Stockholm, Sweden
stuart wrote:
Nihilus wrote:
To get netpbm working do this:
Code:
2) cd /usr/pkgsrc/devel/netpbm cvs update -dP -D20050801


The latest working version of NetPBM is 10.29, from Makefile revision 1.125, 2005/09/20.

All of the 10.3x releases break because no pm_error symbol is defined.



And of course it's in graphics/netpbm.

_________________
SGI Systems: R4K :Indigo:/256MB/XS-24, R5K 150MHz :Indy:/160MB/XL-24, R10K 175MHz :O2:/640MB, R12K 400MHz :Octane2:/Vpro6/1GB & R4K 250 MHz :Indigo2IMP:/128 MB/XZ Extreme/GIO64 FDDI

"It's a UNIX system! I know this! "


Last edited by Nihilus on Mon Sep 11, 2006 4:29 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
Unread postPosted: Mon Sep 11, 2006 4:28 pm 
Offline
User avatar

Joined: Sat Dec 18, 2004 8:21 am
Posts: 301
Location: Stockholm, Sweden
Code:
BUILTIN_PKG.xpm=        xpm-3.4k


for using builtin xpm :)

_________________
SGI Systems: R4K :Indigo:/256MB/XS-24, R5K 150MHz :Indy:/160MB/XL-24, R10K 175MHz :O2:/640MB, R12K 400MHz :Octane2:/Vpro6/1GB & R4K 250 MHz :Indigo2IMP:/128 MB/XZ Extreme/GIO64 FDDI

"It's a UNIX system! I know this! "


Top
 Profile  
 
 Post subject:
Unread postPosted: Mon Sep 11, 2006 9:06 pm 
Offline
User avatar

Joined: Sat Dec 18, 2004 8:21 am
Posts: 301
Location: Stockholm, Sweden
More out of the mk.conf:

Code:
INCOMPAT_CURSES+=       IRIX-*-*
IMAKE_TOOLS+=           gmake
PKG_DEFAULT_OPTIONS+=   arping1
PKG_DEFAULT_OPTIONS+=   freetype
PKG_DEFAULT_OPTIONS+=   x11
PKG_DEFAULT_OPTIONS+=   ncurses
PKG_OPTIONS.SDL+=       -esound -arts -nas
PKG_OPTIONS.smpeg+=     -gtk-player -opengl-player
PKG_OPTIONS.perl+=      -threads
# Builtins
BUILTIN_PKG.perl=       perl-5.4.5
USE_BUILTIN.perl=       YES
TOOLS_PLATFORM.perl?=   /usr/sbin/perl
TOOLS_PLATFORM.gs?=     /usr/bin/gs
TOOLS_PLATFORM.ps2pdf?= /usr/bin/ps2pdf
TOOLS_PLATFORM.dvipdf?= /usr/bin/dvipdf
TOOLS_PLATFORM.pdf2ps?= /usr/bin/pdf2ps
BUILTIN_PKG.ghostscript=        ghostscript-6.01
USE_BUILTIN.ghostscript=        YES
BUILTIN_PKG.nedit=      nedit-5.3
BUILTIN_PKG.nawk=       nawk-20050424
BUILTIN_PKG.xpm=        xpm-3.4k
BUILTIN_PKG.png=        png-1.2.10
USE_BUILTIN.png=        YES
BUILTIN_PKG.jpeg=       jpeg-6bnb2
USE_BUILTIN.jpeg=       YES
BUILTIN_PKG.tiff=       tiff-3.8
USE_BUILTIN.tiff=       YES

_________________
SGI Systems: R4K :Indigo:/256MB/XS-24, R5K 150MHz :Indy:/160MB/XL-24, R10K 175MHz :O2:/640MB, R12K 400MHz :Octane2:/Vpro6/1GB & R4K 250 MHz :Indigo2IMP:/128 MB/XZ Extreme/GIO64 FDDI

"It's a UNIX system! I know this! "


Top
 Profile  
 
 Post subject: fonts/fontconfig
Unread postPosted: Wed Sep 20, 2006 1:47 am 
Offline
User avatar

Joined: Mon Aug 23, 2004 4:37 pm
Posts: 911
Location: Cambridge, UK
fontconfig needs a small patch to fix dumb GNU-isms:

Code:
--- fccache.c.dist 2006-09-10 00:30:00.000000000 +0100
+++ fccache.c      2006-09-12 12:48:56.956367480 +0100
@@ -809,7 +809,7 @@
  * Hokey little macro trick to permit the definitions of C functions
  * with the same name as CPP macros
  */
-#define args(x...)         (x)
+#define args(...)          (__VA_ARGS__)
 
 const FcChar8 *
 FcCacheDir args(const FcCache *c)


During the build process, a file named "fcaliastail.h" is generated... which by default contains one "#if" directive and 181 "#endif"s. For obvious reasons, the MIPSpro preprocessor barfs at this. All except the last of these "#endif"s need removing - it's probably best to use sed or awk.


Top
 Profile  
 
 Post subject:
Unread postPosted: Wed Sep 20, 2006 4:00 am 
Offline
Moderator
Moderator
User avatar

Joined: Sun Dec 21, 2003 5:59 pm
Posts: 1359
Location: Cheshire, MA
This is excellent. Let me make this a sticky.

Edit: I can't. neko?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group