Compiling an old linux code on a new mac

Hello,
I am trying to compile an old Linux program on my new macbook pro (Intel + 10.6). The program uses a mix of fortran and c source codes. On the Linux environment where it works I have gcc(f77) 3.2.3 installed.
The only external library called for in the Makefile is libg2c, which as far as I can tell comes with gcc 3 but not any longer in gcc 4. This means that the original Makefile, which works on a Linux environment with gcc 3.2.3 does not work on my Mac.
For sure I need some g2c-like library because the system is mixing Fortran and C code, and doesn't compile if I just remove -lg2c from the Makefile, the compiling crashes.
I have tried to install libf2c from Fink but it doesn't seem compatible with gfortran created code.
Now I'm a bit lost. Can someone offer some help?

atticus_pf wrote:
You keep saying gcc4.4 is bad.
There is nothing inherently wrong with gcc4.4. I just don't trust anything that comes from the Mac "ports" packages. Why would I need to "port" something to MacOS X if it build fine from a tarball? More importantly, why would I use a version newer than what Apple ships with the OS? MacOS X is not Linux. Those newer versions have not been tested and MacOS X and MacOS X is fundamentally different from any OS that those versions have been tested on. If you want to test new software on Mac OS X, that's great. Just get the original code and build it yourself instead of going through a 3rd party who may or may not know what they are doing. Every time I see a problem here in Apple Discussions with someone who can't build an open-source software package on MacOS X, some "ports" package has been installed. Every Time.
What is the best version to use? I have gcc in /usr/bin which is gcc 4.2.1 - I think this is the apple version. ... I just want to use what is best and most reliable.
That would be the one Apple build the OS with. Even then, gcc 4.2.1 is still a bit flaky on MacOS X. Apple may never use gcc 4.4. It is moving towards Clang for future development.
gcc -framework Carbon -arch i386 -m64 -g -I/Users/jpfaendt/Modeling/parest/ddasac/software/include -O2 -o parest ./model.o jacobian.o bsub.o -L/Users/jpfaendt/Modeling/parest/ddasac/software -L/Users/jpfaendt/Modeling/parest/ddasac/software/myUtil -L/Users/jpfaendt/Modeling/parest/ddasac/software/lib -L/sw/lib/gcc4.4/lib -lm -lliqparest -ldassl -lgregpack -lgfortran -lUtil -L/sw/lib/gcc4.4/lib/
Undefined symbols:
"_Delete", referenced from:
_ModelODEs in model.o
sorry for the messy paste, it's an ugly makefile (although it works in linux). You can see I'm including libraries that I myself compiled (libliqparest, libdassl, libgregpack, libUtil are all compiled in this code).
But what is that "-m64" doing there? That is not a good flag to use even in the best of times. It really isn't appropriate with "-arch i386". Add to that the fact that Carbon isn't 32-bit and you've got a mess-o-problems.
The first function that has a problem above (_Delete) is defined in a c program that is compiled as part of libUtil.a. This library just has a bunch of house-made functions for vector handling, etc. The code could be probably be overhauled to not need this anymore but I don't have the energy to do it.
I really think these are old relics of a MacOS port back when you needed such "ports" because MacOS (note the absence of "X") didn't have such things as open(), malloc(), and free().
You have the source to libUtil.a, so it would be worthwhile to look at it and see if my hypothesis is correct. You may be able to fix it with just a compiler flag and have it use the POSIX code instead of the MacOS Carbon routines. Then, hopefully, you can get rid of Carbon altogether and build a true 64-bit executable.
In any case, I'm now suspecting my compiler configuration, etc for causing the problems. What is the best solution for having the fink gcc-4 installed and apples gcc installed? I guess I have to reconcile this somehow with the gfortran that is in /sw/bin.
You could also download a better version of gfortran that installs into /usr/local, where it is supposed to be.

Similar Messages

  • Can I use my old apple monitor with a new mac mini?

    Can I use my old apple monitor with a new mac mini?

    Probably.  Any information about the monitor?

  • I have a new IMAC with a Maverick platform (I can update to Yosemite). I did all graphics on a G5 Power PC (very old), in Freehand (very old)... How can I open old Freehand files on this new Mac? Can I still open and work in Freehand on this new Mac?

    I have a new IMAC with a Maverick platform (I can update to Yosemite). I did all graphics on a G5 Power PC (very old), in Freehand (very old)...
    How can I open old Freehand files on this new Mac?
    Can I still open and work in Freehand on this new Mac?

    Let me see if I've gotten this right! You want to remove an account from BOTH machines? Do this for your new machine first, then for the other.
    Click the Apple logo on the top left of the screen, System Preferences, Users and Groups (under Systems), unlock the lock in the window if its locked (you need to know the password), select the user that you wish to remove, and click the - sign next to the + sign for Login options. A window will pop up with some options. Select Delete this user and securely, and click 'Delete user'.
    After this, do an update from the App Store.
    Thats all there is to it.
    For the other machine repeat the process except for one thing. Before you delete the user in this case YOU, you will have to give Administrator priviledges to your son bu checking the box 'Allow user to administer this computer'.
    Do NOT do anything from Finder ... if you dont know how to fix the consequences of the problems caused.
    There is no need to unauthorize your iTunes account on your new machine. Do it on the old machine though.

  • Whats the best way to transfer everything from my old macbook pro to a new mac mini, i have a external hard drive which i backup to regularly via time capsule

    whats the best way to transfer everything from my old macbook pro to a new mac mini, i have a external hard drive which i backup to regularly via time capsule

    Check out > OS X Lion: How to use Migration Assistant to transfer files from another Mac

  • I have a new Mac Pro.  I want to use my old Mac Pro as a storage drive for photos and old documents, linked to my new Mac Pro.  How do I set up the old computer?

    I have a new Mac Pro.  I want to use my old Mac Pro as a storage drive for photos and old documents, linked to my new Mac Pro.  How do I set up the old computer?  Both computers have OS X10.9.3.  Currently they are connected by a Firewire 800 cable.

    You certainly could keep the old Mac Pro in Firewire mode (hold down the T key on its keyboard as you boot) to show its drives on the new MP. This is basically as fast as putting the drives into a Firewire enclosure.
    Or you could boot it normally and share its files over the network using the Sharing panel of System Preferences. If you turn on both File and Screen Sharing, you don't even need to have a monitor attached - you can do all administration using screen sharing. However, this method requires that you open all files over the network, which will be slower than the direct-connect method above, and may also not work with all applications.
    Matt

  • I would like to transfer my old copy of Photoshop Extended, from my old Windows laptop to the new Mac computer. Thank you

    I would like to transfer my old copy of Photoshop Extended, from my old Windows laptop to the new Mac computer. Thank you

    If your copy of PS was for Win, your installation disk is not compatible with Mac.  You can't use a Win serial number on Mac either.  You would need to contact Adobe Customer Care and request a cross grade.  Depending on which version you own, this may no longer be possible.  I believe CS6 still qualifies for cross grades though. 
    Another option is to join the Creative Cloud Photography Plan ($9.99/mo) which includes PS CC and Lightroom which will run on on both Mac & Win.
    Creative Cloud Photography plan | Adobe Creative Cloud
    Nancy O.

  • Is it possible to trasfer PS5 from my old windows PC to my new Mac?

    Is it possible to transfer PS5 from my old windows PC to my new Mac?

    If you mean Photoshop v 5.0, no. It's no longer sold or supported.
    If you mean Photoshop CS5, you would have to purchase CS6 Mac as a cross platform upgrade.
    http://helpx.adobe.com/x-productkb/policy-pricing/order-product-platform-language-swap.htm l

  • Will any of my old displays work with the new Mac Mini

    I am thinking of getting a new Mac Mini.     What I need to know is if any of the monitor/displays I have here can bem used.
    I have two old video monitors I used to used with my old  mac mini (Samsung Symc Master 770 and old little Princeton  - VL158) , a
    n early 2006 iMac 20" (which I don't think I could use as a monitor from what I read) and an little Samsung TV with USB and HDMI connectors.,
    Can I use any of these? 
    Need new connector cords?   Mini-DVI to VGA adapter?
    Thanks

    I am a writer though  and a photographer (strictly point and shoot) for a couple of orgs.  I just don't want o run out of space.  And I hate!! slow response time.  
    Is the i5 adequate as well?
    Glad to have found an Apple guru so quickly.  May very well buc you more in the future.

  • Transfer old MacBook Pro files to new Mac mini via wifi stuck

    I'm going through the setup of my new Mac mini.  The first thing it is having me do is transfer old data and applications via wifi from my MacBook Pro (running snow leopard) it is taking forever (over 24 hours now) and apparently stuck.  How do I stop and restart the transfer using Ethernet cable or FireWire to speed up the transfer process. This is a brand new mini running some version of mountain lion. Thanks!

    How are you transferring the files now?
    To me the easiest, most reliable, and generally fastest method is..
    With both computers powered down connect them back to back with a firewire cable
    Boot the old computer into Firewire Target Disk Mode by holding down the T key during boot
    Boot the new computer and the old computer should appear on the desktop as a firewire drive
    On the new computer launch Migration Assistant (found in /Applictions/Utilities)
    Follow MA's on screen prompts to transfer the data from another disk drive (the old computer running in Firewire Target Disk mde) This last step is best performed during the initial setup of the new computer when prompted early in the initial setup phase

  • ICloud old purchases of music on new mac

    I am not able to download my old music purchases onto my new MacbookPro. It gives me the option to download it but then tells me that there is a system error and that they cannot be downloaded. HELP!

    iPhoto 09 will run on your new Mac. Your issue may be installing it though. You can't just copy it over and the SystemRestore disk from your old mac won't work on the new one.
    The differences between 09 and 11 are not that great.
    Regards
    TD

  • Starting up problems from an old boot drive in a new mac pro

    Just purchased a refurb mac pro last weekend through the apple store. I took my old drive my my first mac pro and was trying to usee it for the boot drive, That machine did not come with snow leopard. I did upgrade it to 10.6.6. When I start up from that drive in the new mac pro it was either starting up real slowly or starting up and would not give me a cursor or. On some occasion I would get a translucent blue huge on the screen. Or I could get a clear screen but nothing would happen if I clicked to open anything. I called support and we reinstalled the on the old drive. I seemed stable and was booting properly from the old drive. Then I upgraded to 10.6.6 again. We used the software the new machine came with for this process. I maybe used the new boot drive for maybe 50 seconds. Apple support wishes for me to go through the process of isolating elements. I've been running the new drive since yesterday. Everything is working well. Except after letting it run for a period of time yesterday got s grey screen after it went to sleep. We'll see what happens with that today. I do not know if it's coincidence or not but the old system went hicky after I started up Paralllels desktop.I'm using Parallelsto run Playon. I'm wondering if Parallels or the xp emulation machine I'm running with it is still trying to read the old macpro ? It did work however. I'm just curious that it's altering something in the Mac osx ? Another thing should I subtract other wirleeless choice devices on the old drive's system ? The old macpro had wireless but the module was installed aftermarket by a mac store.
    Thanks

    Hard to follow your steps and thoughts. Maybe re-read and cut it into actual steps.
    Always clone a system so you have a bootable backup image.
    Make sure your software and drivers are compatible.
    2010s boot into 64-bit kernel mode by default.
    Apple still sells 2009s also on Specials page.
    Your old Mac Pro wouldn't come with 10.6 unless it came out in Sept 2009 or later.
    Is Parallels current? Is it attached to Windows partition or VM only? does it care that it is running on new hardware? that usually is a non-starter.
    New Mac is also a good time to do thorough spring house cleaning. Clean install all the applications and drivers.
    Pull your old drive out. The only use for it would be to run Setup Assistant to import your home account prefs.
    The "new" refurbished hard drive is still in same state it was in when you got it?
    Sleep issue. you may have external devices or 3rd party drivers or bad cable somewhere.
    Wireless?
    At this point I doubt I can read between the lines.
    +Break it into compartments and subjects instead of hash stew for us!+

  • Transfer old computer applications to a new Mac Pro

    What is the best way to transfer older Mac Pro hard drivel new Mac pro

    This pair of devices and a pair of eSATA cables could act as a bridge between old and new:

  • Old AJA KONA card into new Mac Pro.

    Hi all
    At the company where I am doing some editing, there oldest suite was run on a G5. Suddenly it started to turn itself off. After taking it into an apple store for repair they quite quickly turned around and said "This is an old G5 we can't repair it, but we will replace the machine with a new Mac Pro, for the price of the repair". Great!
    However the the KONA LHe card that it was using looks like a normal PCI interface (or PCI-X), and it seems apple have done away with this, as this new model contains only PCIe slots. Is there a way of making it work? Does anyone know if apple do a spec with a PCI slot now? Is this KONA card completely useless now?
    I know what the likely answer is, just thought i'd put the discussion out there.
    Neil

    Sorry Shane. I did mean LH.
    I always thought the card in the machine was a LHe card, so when the G5 starting turning itself off unexpectadly, and Apple couldn't repair it, they gave us a new machine for the price of the repair, I thought it would still be fine as the card is an LHe. I didn't know that it was an older model and the earlier generation Kona Cards were PCI-X.
    Hey now I know the what e stands for at least. Although in the context of this company the Kona LH card is pretty much Obsolete!
    Thanks for comments.

  • How to transfer I tunes from old windows lap top to new Mac lap top

    How do you transfer your i tunes account from an old windows lap top to your new Mac?

    Drag and drop copy the iTunes folder to a external hard drive on Windows, then take it to the Mac and use iTunes there to import it.
    If you want to read/write the external drive between Mac's and PC's, right click on the drive and format it exFAT or FAT in Windows, not NTFS.
    Some Mac's can read NTFS, but not write to that format as it's proprietary.
    When you format the drive, all data will be erased on it, so make sure before you do so.

  • Question re: Copying an old iPhoto Library to a new Mac

    Hi -
    I have an old, G5 PowerPC iMac, running OSX 10.4.11 and iPhoto '08 (version 7.1.5), and a new (2013) MacBook Pro running OSX 10.9.3 and iPhoto version 9.5.1.
    I'd like to know if I'd have any problems copying the old iPhoto Library (22 GB) from the G5 iMac to the new MacBook Pro.  I'm concerned that the great difference in versions would prevent the library from updating to the current version once it is copied.  Thanks for any information or help anyone can provide.  Thanks,
    Shelly

    Copy the library to your new Mac.
    To be able to upgrade it to iPhoto '11  run the iPhoto Library Upgrader on your newer Mac, see this document: 
    iPhoto '11: About the Library Upgrader

Maybe you are looking for