Where can i get gcc4?

2 views
Skip to first unread message

huss...@gmail.com

unread,
Dec 4, 2008, 12:44:44 AM12/4/08
to FASTlib_forum
do we need gcc4 to compile mlpack?
and if so, where do i get it?

Nikolaos Vasiloglou II

unread,
Dec 4, 2008, 12:47:39 AM12/4/08
to FASTlib_forum
Yes you need gcc4, What platform do you use. If you use cygwin you can
use the cygwin installer to install gcc4

huss...@gmail.com

unread,
Dec 4, 2008, 12:55:08 AM12/4/08
to FASTlib_forum
I am using linux (Ubuntu)

Nishant

unread,
Dec 4, 2008, 12:56:56 AM12/4/08
to FASTlib_forum
Nik, I think the problem he was having is that he has gcc version 4,
but the binary is called 'gcc', rather than 'gcc4', so the build
script isn't finding a binary 'gcc4'

huss...@gmail.com

unread,
Dec 4, 2008, 1:01:11 AM12/4/08
to FASTlib_forum
Yeah..exactly... I have gcc version 4.2.4...

Nikolaos Vasiloglou II

unread,
Dec 4, 2008, 1:04:55 AM12/4/08
to FASTlib_forum
Ok so make a soft to gcc with gcc4
go to the directory where you have gcc installed and do sudo ln -s gcc
gcc4

Nikolaos Vasiloglou II

unread,
Dec 4, 2008, 1:06:09 AM12/4/08
to FASTlib_forum
You also need to do the same thing for g++
ln -s g++ g++4

huss...@gmail.com

unread,
Dec 4, 2008, 1:14:12 AM12/4/08
to FASTlib_forum
Thanks a lot... It compiles fine now

Ryan Riegel

unread,
Dec 4, 2008, 1:35:57 AM12/4/08
to fastli...@googlegroups.com
We should consider changing fl-build to default to gcc/g++ again, as I'm having to make this switch on every platform *but* our lab machines, and instead scan for gcc4/g++4, using them if present.  It should be relatively easy to accomplish this in the script, though again it boils down to asking "if I typed this in the command prompt, would anything happen?", which I haven't quite figured out how to do in python yet.  Any ideas?

  --Ryan

Nikolaos Vasiloglou II

unread,
Dec 4, 2008, 1:40:02 AM12/4/08
to FASTlib_forum
I have done something similar for lapack, I am not sure if that is
what you are looking for. Take look at the build file

Dongryeol Lee

unread,
Dec 4, 2008, 8:18:24 AM12/4/08
to fastli...@googlegroups.com
You can use the os.popen call to open a pipe inside the script to call the
following command:
result1 = os.popen('which g++-4');
result2 = os.popen('which g++4');

(a similar command called "locate" or "slocate" seems to be broken on cygwin..."
If result2 is empty, then use the path in result1 for the compiler, etc.
This is how detect whether to use curl or wget inside fl-build. But what might be
more ideal is to make another script called "fl-setup" that basically setups the
system once to find all these variables (instead of fl-build looking up these
on the fly) to cut down the build time; this is how CMake works.
--
Dongryeol Lee
Ph.D. Student, College of Computing
Georgia Institute of Technology
Reply all
Reply to author
Forward
0 new messages