2

I want to build fossil code on Solaris.

wget http://www.fossil-scm.org/index.html/tarball/tip.tar.xz
tar xf tip.tar.xz ; cd tip.tar
./configure CC=gcc CXX=g++ C=gcc BCC=gcc  # no error

It will cause

$make
cc -o bld/translate ./src/translate.c
/usr/ucb/cc:  language optional software package not installed
$which cc
/usr/ucb/cc
$which gcc
/usr/local/bin/gcc
$which g++
/usr/local/bin/g++

I'm sure my gcc/g++ are workable. After I add a dirty hack on replace the 'BCC = cc' line of Makefilewith 'BCC = gcc' after ./configure. It compilable. But I don't know how to fix the source code.

Daniel YC Lin
  • 15,050
  • 18
  • 63
  • 96
  • There is an infinite number of possible `configure` scripts, each with its own quirks. It is not possible to tell anything without looking at the script and/or the log it produces. – n. m. could be an AI Jan 10 '13 at 08:34

2 Answers2

3

I downloaded that tarball, ran command ./configure CC=gcc and found it did not work at all, the generated Makefile still use cc for default compiler.

Use vi edit Makefile, change

BCC = gcc
....
TCC = gcc

then make again.

Flily Hsu
  • 111
  • 1
  • 6
1

Set the compiler in the environment.

export CC=gcc

Patrick Farry
  • 101
  • 1
  • 5