threads / discuss / 25027

building git on Solaris

Subject: building git on Solaris

## tl;dr

6 messages between Sep 7, 2010 and Sep 10, 2010.

replies: 5people: 5as markdown or json

Chris Hoogendyk· Sep 7, 2010, 21:02 UTC · lore
Building git 1.7.1 on Solaris 9 using gcc and gnu tools.
My build environment includes:
    CC=gcc
    CFLAGS='-L/usr/local/lib -R/usr/local/lib'
    CPPFLAGS=-I/usr/local/include
    LDFLAGS='-L/usr/local/lib -R/usr/local/lib'
    LD_INCLUDE_PATH=/usr/include:/usr/local/include
    LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/usr/sfw/lib
    
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/ucb:/usr/ccs/bin
    PWD=/usr/local/src/git/git-1.7.1
    SHELL=/bin/ksh

If I ask `which make`, I get /usr/local/bin/make. If I say, `make --version`, I get "GNU Make 3.80".

If I ask `which perl`, I get /usr/local/bin/perl. If I say, `perl --version`, I get "This is perl, v5.8.6 built for sun4-solaris-thread-multi".

I'm building with
     # make configure
     # ./configure --prefix=/usr/local
     # make all doc
     # make install install-doc install-html

It seems to work fine (though way sparse in what it has to say), until it hits here (from the `make all doc`):

            :
            :
        GEN git-submodule
        GEN git-web--browse
        SUBDIR perl
    make: Warning: Ignoring DistributedMake -o option
    Usage : make [ -f makefile ][ -K statefile ]... [ -d ][ -dd ][ -D ][ 
-DD ]
                 [ -e ][ -i ][ -k ][ -n ][ -p ][ -P ][ -q ][ -r ][ -s ][ 
-S ][ -t ]
                 [ -u ][ -w ][ -V ][ target... ][ macro=value... ][ 
"macro +=value"... ]
    make: Fatal error: Unknown option `-C'
    make: *** [perl/perl.mak] Error 1

I couldn't figure out where that was coming from (Can I turn on a bit more verbosity during the build?) until I tried to do a `make clean` and got a little more detail, where it ended up with `make -C Documentation/ clean` followed by the same set of errors.

When I simply enter `make -C Documentation/ clean` from the command line, it works.

Poking around, I eventually found that /usr/ccs/bin/make will emit those errors, whereas /usr/local/bin/make does not. However, /usr/ccs/bin/make should never be called. That is last in my PATH, whereas /usr/local/bin/make is first in my PATH.

So, something fishy is going on with the environment. But, those path precedences are everywhere in my system. If I `su - nobody`, for example, I get /usr/local/bin first in the PATH. I also did a `find . -type f | xargs grep ccs` from within /usr/local/src/git/git-1.7.1, and the only things I found were in the config.log where it was noting /usr/ccs/bin/ar, /usr/ccs/bin/as and /usr/ccs/bin/ld, which, I believe, are correct.

Does anyone have any guidance or clues as to where I should look from here? Or how to fix this?

TIA
---------------------
NOTE: I also had to do the following:
    # diff configure configure.orig
    7810c7810
    <   for opt in -pthreads -lpthreads; do
    ---
    >   for opt in -pthread -lpthread; do
    #
to get rid of errors like this:
               :
               :
        CC xdiff/xpatience.o
        AR xdiff/lib.a
        LINK git-fast-import
    gcc: unrecognized option `-pthread'
        CC imap-send.o
        LINK git-imap-send
    gcc: unrecognized option `-pthread'
        CC shell.o
        LINK git-shell
   gcc: unrecognized option `-pthread'
        CC show-index.o
        LINK git-show-index
    gcc: unrecognized option `-pthread'
               :
               :
---------------------
-- 
---------------

Chris Hoogendyk

-
   O__  ---- Systems Administrator
  c/ /'_ --- Biology & Geology Departments
 (*) \(*) -- 140 Morrill Science Center
~~~~~~~~~~ - University of Massachusetts, Amherst 

<hoogendyk@bio.umass.edu>

--------------- 

Erdös 4
Chris Hoogendyk· Sep 8, 2010, 14:46 UTC · re: Ævar Arnfjörð Bjarmason · lore

Re: building git on Solaris

Ævar Arnfjörð Bjarmason wrote:
Show 7 quoted lines
> On Tue, Sep 7, 2010 at 21:02, Chris Hoogendyk <hoogendyk@bio.umass.edu> wrote:
>   
>> Does anyone have any guidance or clues as to where I should look from here?
>> Or how to fix this?
>>     
>
> Call make as gmake?
magical.

I did an `ln -s /usr/local/bin/make /usr/local/bin/gmake` and then referenced gmake rather than make. For some reason, that got over the hump. I have no clue why calling make would initially work and later in the process revert to /usr/ccs/bin/make, but calling the same code via the symlink name gmake works.

Anyway, now I'm in the normal build debugging mode. Got all the way through to building the Documentation, at which stage I now need to get asciidoc and python. I don't really like bloating my minimal server systems with python, but it seems I'm finally stuck, since I have faculty who really want to use git.

Thanks for the clue.
-- 
---------------

Chris Hoogendyk

-
   O__  ---- Systems Administrator
  c/ /'_ --- Biology & Geology Departments
 (*) \(*) -- 140 Morrill Science Center
~~~~~~~~~~ - University of Massachusetts, Amherst 

<hoogendyk@bio.umass.edu>

--------------- 

Erdös 4
Ben Walton· Sep 8, 2010, 14:55 UTC · re: Chris Hoogendyk · lore

Re: building git on Solaris

Excerpts from Chris Hoogendyk's message of Wed Sep 08 10:46:55 -0400 2010:
Hi Chris,
> get asciidoc and python. I don't really like bloating my minimal
> server systems with python, but it seems I'm finally stuck, since I
> have faculty who really want to use git.

You could also use the git packages[1] from OpenCSW. You'll get all of the dependencies, etc and you won't need to install python. You will get the OpenCSW packages for perl, etc though, which you may find to be bloat too?

HTH. -Ben

[1] http://opencsw.org/packages/git -- Ben Walton Systems Programmer - CHASS University of Toronto C:416.407.5610 | W:416.978.4302

Brandon Casey· Sep 8, 2010, 15:16 UTC · re: Chris Hoogendyk · lore

Re: building git on Solaris

On 09/08/2010 09:46 AM, Chris Hoogendyk wrote:
Show 16 quoted lines
> Ævar Arnfjörð Bjarmason wrote:
>> On Tue, Sep 7, 2010 at 21:02, Chris Hoogendyk <hoogendyk@bio.umass.edu> wrote:
>>  
>>> Does anyone have any guidance or clues as to where I should look from here?
>>> Or how to fix this?
>>>     
>>
>> Call make as gmake?
> 
> magical.
> 
> I did an `ln -s /usr/local/bin/make /usr/local/bin/gmake` and then referenced gmake rather than make. For some reason, that got over the hump. I have no clue why calling make would initially work and later in the process revert to /usr/ccs/bin/make, but calling the same code via the symlink name gmake works.
> 
> Anyway, now I'm in the normal build debugging mode. Got all the way through to building the Documentation, at which stage I now need to get asciidoc and python. I don't really like bloating my minimal server systems with python, but it seems I'm finally stuck, since I have faculty who really want to use git.
> 
> Thanks for the clue.
There is a quick-install-doc make target.

It extracts prebuilt documentation from a branch named origin/man in your repository. Junio keeps this up-to-date with the Documentation on master. You can use it instead of trying to build the documentation from scratch.

-Brandon
Tomas Carnecky· Sep 10, 2010, 20:00 UTC · re: Chris Hoogendyk · lore

Re: building git on Solaris

On 9/8/10 4:46 PM, Chris Hoogendyk wrote:
Show 5 quoted lines
> Anyway, now I'm in the normal build debugging mode. Got all the way
> through to building the Documentation, at which stage I now need to get
> asciidoc and python. I don't really like bloating my minimal server
> systems with python, but it seems I'm finally stuck, since I have
> faculty who really want to use git.

Git doesn't *need* python nor asciidoc, it works just fine without. Except, of course, that tools which require python don't work (but there aren't many of those, most is C, shell and perl).

tom

← back to recent threads