You are not logged in.

#1 2010-02-27 23:59:18

gopichand
Member
From: Bowling Green, KY
Registered: 2010-02-04
Posts: 31

[SOLVED]How to install GCC 4.1 for MatLab 2009b under Arch.

Hello!

May I know how to install the old GCC 4.1 in Arch Linux. I understand that I need to download the GCC 4.1 from the SVN and install it using the PKGBUILD, can some one give me a clear procedure to install the gcc-4.1

I need it for MatLab 2009b running on 32bit.

Thank You

Last edited by gopichand (2010-05-11 23:29:50)


Open your mind, use OpenSource!

Offline

#2 2010-02-28 03:11:49

xduugu
Member
Registered: 2008-10-16
Posts: 292

Re: [SOLVED]How to install GCC 4.1 for MatLab 2009b under Arch.

Offline

#3 2010-02-28 03:21:22

n0dix
Member
Registered: 2009-09-22
Posts: 956

Re: [SOLVED]How to install GCC 4.1 for MatLab 2009b under Arch.

Like suggest xduugu you don't need really a procedure to install gcc 4.1, just # yaourt -S gcc41.

Offline

#4 2010-02-28 04:45:25

gopichand
Member
From: Bowling Green, KY
Registered: 2010-02-04
Posts: 31

Re: [SOLVED]How to install GCC 4.1 for MatLab 2009b under Arch.

Thanks Guys!

I will try 'yaourt' and will get back to you guys!


Open your mind, use OpenSource!

Offline

#5 2010-02-28 04:50:17

n0dix
Member
Registered: 2009-09-22
Posts: 956

Re: [SOLVED]How to install GCC 4.1 for MatLab 2009b under Arch.

gopichand wrote:

Thanks Guys!

I will try 'yaourt' and will get back to you guys!

I little personal suggestion, install yaourt following the wiki page. Then install packer, and uninstall yaourt. IMHO packer is better to find, to install and more reliable.

Good luck!

Last edited by n0dix (2010-02-28 04:50:50)

Offline

#6 2010-02-28 04:54:11

gopichand
Member
From: Bowling Green, KY
Registered: 2010-02-04
Posts: 31

Re: [SOLVED]How to install GCC 4.1 for MatLab 2009b under Arch.

Thank you!

I was always an Ubuntu user, I tried lots of other distros but kept going back to Ubuntu. I am desperate to move to a different distro and I chose Arch.

Thanks for the quick replies guys, I have started liking Arch smile


Open your mind, use OpenSource!

Offline

#7 2010-02-28 14:50:26

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [SOLVED]How to install GCC 4.1 for MatLab 2009b under Arch.

My advice is that you learn how to do a chroot, then use a server install of centos 5 to run matlab and keep things separated. Commercial programs are mostly tested with multilib distros (which arch isn't) so a chroot will keep those programs happy and keep your arch system running fine without the need to use any hacks whatsoever.

This is just my 2c, do it as you like but I've learned the hard way that it is best to keep things separated. By the way, I'm using a chroot with a server install of centos 4 (for matlab and eda software), matlab 2009b issues a warning about glibc being version 2.3.4 and matlab being built with version 2.3.6 but it still runs fine (as far as I can tell).


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#8 2010-02-28 17:05:17

gopichand
Member
From: Bowling Green, KY
Registered: 2010-02-04
Posts: 31

Re: [SOLVED]How to install GCC 4.1 for MatLab 2009b under Arch.

@Rookie

I wanted to use it with Arch! but couldnt get the Gcc-4.1 earlier. So I went back to Ubuntu, where the Gcc4.1 installation was really easy, Matlab was still complaining but it was working, and I was able to run the mex programs.

I am seriously thinking to coming out of the Ubuntu world! its simply that I want to try Arch.

The laptop I use for Matlab has only 1GB of RAM, you think thats sufficient to run the chroot?

Last edited by gopichand (2010-02-28 17:25:11)


Open your mind, use OpenSource!

Offline

#9 2010-02-28 17:38:17

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [SOLVED]How to install GCC 4.1 for MatLab 2009b under Arch.

gopichand wrote:

The laptop I use for Matlab has only 1GB of RAM, you think thats sufficient to run the chroot?

I can't say for sure ... you will need to have enough ram to load all the libraries needed plus to run matlab.

I'm running a few other apps with the chroot and started matlab just now and in my system everything is using over 1GB of ram. I have 4GB so that's not much of a concern here but for you I don't know, your system should already be a bit short on ram to run such a heavy weight as matlab 2009b.

Maybe the kernel will be able to offload some things to swap but it has the potential to be slow as molasses.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#10 2010-02-28 23:32:15

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,362

Re: [SOLVED]How to install GCC 4.1 for MatLab 2009b under Arch.

I use matlab myself, in 64-bit and without a chroot (would work with 32-bit as well).

What I do is symlink the gcc libraries to the system versions. I'm a PhD student and develop some algorithms in C/mex, things work fine here. Can't recall exactly what needs to be symlinked, but from the error messages you get, just move those libraries to a safe place (.old or something) and symlink the libraries from your current GCC install.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#11 2010-03-01 03:05:06

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [SOLVED]How to install GCC 4.1 for MatLab 2009b under Arch.

Symlinking does work fine most of the times and with matlab it shouldn't be much of a problem, however solving problems that way is a bad practice and it is asking for trouble later on.

I've been down that road before and stopped doing it, it's too hard to find everything that needs changing and keep track of all changes for future installs, and you never know if everything is actually working as it should or if something will prove to be broken at the least opportune time.

Either way, use whatever floats your boat tongue


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#12 2010-03-01 03:18:55

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,362

Re: [SOLVED]How to install GCC 4.1 for MatLab 2009b under Arch.

R00KIE wrote:

Symlinking does work fine most of the times and with matlab it shouldn't be much of a problem, however solving problems that way is a bad practice and it is asking for trouble later on.

Yes it is bad practice. Practically, however, I'm using (forced to use) a proprietary software due to my work. I have no access to source code or to the developers. The easiest solution is library symlinking, specifically for this program only.

@ the OP, here's the symlinks I made in $MATALBROOT/sys/os/glnxa64 :-

lrwxrwxrwx 1 ngoonee ngoonee      22 Dec 15 16:42 libgcc_s.so.1 -> /usr/lib/libgcc_s.so.1
lrwxrwxrwx 1 ngoonee ngoonee      28 Dec 15 16:43 libstdc++.so.6.0.13 -> /usr/lib/libstdc++.so.6.0.13

Now that I think about it, it would probably be more 'future-proof' to symlink against /usr/lib/libgcc_s.so and /usr/lib/libstdc++.so, but I'll leave that for future updates.

DISCLAIMER:- doing such symlinking may eat your babies. As far as I can tell though, the only thing affected is used of mex binaries (which is still a big deal, but the biggest possible damage is matlab may not work).


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#13 2010-03-01 04:06:13

gopichand
Member
From: Bowling Green, KY
Registered: 2010-02-04
Posts: 31

Re: [SOLVED]How to install GCC 4.1 for MatLab 2009b under Arch.

Hello!

When I was using Ubuntu, the two gcc were coexisting without an Issue, now if do the same thing in Arch, I believe I should not be having any issues right?

Last edited by gopichand (2010-03-01 04:08:30)


Open your mind, use OpenSource!

Offline

#14 2010-03-01 04:27:37

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [SOLVED]How to install GCC 4.1 for MatLab 2009b under Arch.

ngoonee wrote:

Yes it is bad practice. Practically, however, I'm using (forced to use) a proprietary software due to my work. I have no access to source code or to the developers. The easiest solution is library symlinking, specifically for this program only.

Thats exactly why I setup the chroot wink I'm using proprietary software that depends not only on gcc but other system libraries and I really don't want to go through all the trouble of symlinking. Even the java that is shipped with the program doesn't work properly when run with Arch's directory structure and files so I need to symlink that too, and that's only the start.

To always be wondering if something doesn't work because there is a bug in the software or because I need to go hunt for the next thing I need to symlink is not my idea of fun, after a while of successful symlinking you may fall into the temptation to solve some problems of missing libraries in the system with symlinks too (generally speaking, I'm not saying you will, but look at the people suggesting to fix the "missing" libpng12 libs with symlinks), then later those changes will come back to bite you during a system update where you bork your system and no one can figure out why.

This is just my 2c, probably if only matlab is needed then it will not hurt to solve it with symlinks ... until an update comes down the pipe that breaks matlab and the user is forced to try other solutions (and typically this always happens when one is short on time tongue ).

Talking about matlab specifically ... I think printing is/was broken in a recent matlab release (not sure if it is 2009b or 2009a), the java shipped with matlab has/had a bug that prevented printing, but it seems to be working here with 2009b, just a little heads up just in case you need it and it doesn't work.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#15 2010-03-01 04:30:58

gopichand
Member
From: Bowling Green, KY
Registered: 2010-02-04
Posts: 31

Re: [SOLVED]How to install GCC 4.1 for MatLab 2009b under Arch.

@Rookie

That was a fantastic note! Thank You for your time.

I am definitely not missing the ubuntu forums smile


Open your mind, use OpenSource!

Offline

#16 2010-03-01 13:50:59

eldragon
Member
From: Buenos Aires
Registered: 2008-11-18
Posts: 1,029

Re: [SOLVED]How to install GCC 4.1 for MatLab 2009b under Arch.

on a side note, when i installed matlab here, 2006b i think, i did the symlinks for it, and edited its starter script to fix the java issue. every time i quit matlab, it segfaults. but when the program runs, it works ok wink

Offline

#17 2010-03-23 20:22:25

horsecool
Member
Registered: 2008-12-22
Posts: 55

Re: [SOLVED]How to install GCC 4.1 for MatLab 2009b under Arch.

I have exactly the same problem...

I found a link on mathworks.
http://www.mathworks.com/support/soluti … on=1-OQSVI

It says that it's because the ligg2c runtime library, but the link they provided is broken...

Offline

#18 2010-04-09 20:09:39

gopichand
Member
From: Bowling Green, KY
Registered: 2010-02-04
Posts: 31

Re: [SOLVED]How to install GCC 4.1 for MatLab 2009b under Arch.

This is what I did.

1. Installed yaourt
2. Using yaourt, I installed packer. Removed yaourt.
3. using packer, I ran the command: packer -S gcc41

Then there was some compilation, but gave an error:

../../gcc/crtstuff.c: 1 error: bad value (generic) for -mtune= switch

I made only one change in the PKGBUILD file, I changed the language to en_US.

Am I missing anything???


Open your mind, use OpenSource!

Offline

#19 2010-04-10 00:19:40

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,362

Re: [SOLVED]How to install GCC 4.1 for MatLab 2009b under Arch.

Start a new thread please, your problem is installing tangential to the one in this thread.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#20 2010-04-10 06:59:35

dcc24
Member
Registered: 2009-10-31
Posts: 737

Re: [SOLVED]How to install GCC 4.1 for MatLab 2009b under Arch.

Matlab R2009b works fine for me with gcc 4.4.3 on i686.


It is better to keep your mouth shut and be thought a fool than to open it and remove all doubt. (Mark Twain)

My AUR packages

Offline

#21 2010-04-27 09:23:39

00l0
Member
Registered: 2009-01-19
Posts: 31

Re: [SOLVED]How to install GCC 4.1 for MatLab 2009b under Arch.

dcc24 wrote:

Matlab R2009b works fine for me with gcc 4.4.3 on i686.

The problem, if I'm not mistaken, is not with running matlab itself, but with C/Mex files compilling. : )

Offline

#22 2010-04-27 23:54:28

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,362

Re: [SOLVED]How to install GCC 4.1 for MatLab 2009b under Arch.

00l0 wrote:
dcc24 wrote:

Matlab R2009b works fine for me with gcc 4.4.3 on i686.

The problem, if I'm not mistaken, is not with running matlab itself, but with C/Mex files compilling. : )

Nail. Head.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#23 2010-05-03 21:04:19

gopichand
Member
From: Bowling Green, KY
Registered: 2010-02-04
Posts: 31

Re: [SOLVED]How to install GCC 4.1 for MatLab 2009b under Arch.

Hello Guys!

I successfully installed the GCC 4.1

I changed CFLAGS CXXFLAGS in the file /etc/makepkg.conf
The changes I did:
set them as....
CFLAGS="-march=prescott -02 -pipe -fomit -frame-pointer"
CXXFLAGS="${CFLAGS}"


Then I used the command:$ packer -S gcc41
I had to change the locale language to en_US


Thanks

Last edited by gopichand (2010-05-03 21:07:18)


Open your mind, use OpenSource!

Offline

#24 2011-04-22 22:49:53

gopichand
Member
From: Bowling Green, KY
Registered: 2010-02-04
Posts: 31

Re: [SOLVED]How to install GCC 4.1 for MatLab 2009b under Arch.

Hello Guys,

I have completely moved to Arch smile

Just a quick update about Matlab R2010b

For gcc-4.3
I went to AUR, searched gcc43 and downloaded the TAR file, unzipped it and gave the command:

makepkg -s

It downloaded all the needed files and made the package, I installed it with the command:

pacman -U gcc43*

It installed the GCC43

After Installing the Matlab, I simply created a softlink to the gcc43 at /home/user/.matlab/bin as specified in the Ubuntu Help. I also created a startup file in /home/user/Documents as specified in the Ubuntu Help.

https://help.ubuntu.com/community/MATLAB

I can now compile C files using MEX compiler with no problems.

Thank You

Last edited by gopichand (2011-04-22 22:52:59)


Open your mind, use OpenSource!

Offline

#25 2011-04-23 02:30:53

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,362

Re: [SOLVED]How to install GCC 4.1 for MatLab 2009b under Arch.

gopichand wrote:

For gcc-4.3
I went to AUR, searched gcc43 and downloaded the TAR file, unzipped it and gave the command:

makepkg -s

It downloaded all the needed files and made the package, I installed it with the command:

pacman -U gcc43*

It installed the GCC43

You shouldn't need to post here how to use AUR packages, Arch users are expected to be able to do that (or read the wiki on the subject.

Other than that, good job.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

Board footer

Powered by FluxBB