[Hackage] #98: cabal assumes -x option for linking

Hackage trac at galois.com
Mon Mar 3 21:33:45 EST 2008

#98: cabal assumes -x option for linking
  Reporter:  Christian.Maeder at dfki.de  |        Owner:  ijones         
      Type:  defect                    |       Status:  closed         
  Priority:  normal                    |    Milestone:  Cabal-1.2      
 Component:  Cabal library             |      Version:  1.2.0          
  Severity:  normal                    |   Resolution:  fixed          
  Keywords:                            |   Difficulty:  easy (<4 hours)
Ghcversion:  6.6                       |     Platform:  Other Unix     
Comment (by duncan):

 Replying to [comment:2 guest]:

 > Furthermore the generated file libraries/base/GNUMakefile contained
 "`xargs -s 30000`" which is too big for Solaris (the maximal value is

 I'd really like to get this increased. 2048 is ridiculously low for most
 platforms. We end up doing multiple ar and ld calls even for ordinary
 sized Haskell projects without even using split-objs. If people use split-
 objs we'll end up making 100's of ar/ld calls for larger libs.

 According to POSIX.1-2001 the minimum value for ARG_MAX is _POSIX_ARG_MAX
 which is 4096. So surely even older versions of Solaris must have
 supported at least 4096?

 I used the following C program to test on Solaris 9 and I discovered the
 value is 1048320.

 #include <stdio.h>
 #include <unistd.h>
 #include <limits.h>
 int main () {
   printf("ARG_MAX == %d, sysconf(_SC_ARG_MAX) == %ld\n",
           ARG_MAX,       sysconf(_SC_ARG_MAX));
   return 0;

 On posix systems we could test dynamically using
 `System.Posix.Unistd.getSysVar ArgumentLimit` though it's a pain because
 we'd have to use cpp and add a conditional dependency on the unix package.

 Christian, what version of Solaris are you using and what does the above C
 program report for you?

Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/98#comment:15>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects

More information about the cabal-devel mailing list