Run C program compiled for Linux on Mac x11?

Hi,
Is it possible to run a c-code program compiled for Linux on x11? If this is not possible, is there a way to have a linux platform runninn os 10.6.8 so I can use these programs?
I knew little about Linux or X11, so I don't know if it is possible or how to recompile the program for x11.
Thanks!

Linux compile code will not run on Mac OS X, and even if you violated the Mac OS X license to run Mac OS X in virtual machine on top of Linux, the Mac environment would still not run the Linux program.  The Linux program needs to run on Linux.
If your Linux program is X11 based, then it is possible to run the program on Linux and have the output displayed on your Mac.   Start an Applications -> Utilities -> Terminal session, and run the command
ssh -Y [email protected]
LinuxPrompt> run_your_Linux_program
The ssh -Y will establish an X11 DISPLAY tunnel between your Mac and the Linux system.  When you run an X11 based app on the Linux system via this ssh session, the X11 display output will be sent back to the Mac.
NOTE:  Many Open Source programs have Mac OS X ports.  Sometimes there are actual Mac OS X binaries, and sometimes you have to build them yourself.  There are also services that will do the heavy lifting of installing a ported Open Source app, such as MacPorts.org and FinkProject.org

Similar Messages

  • Any problems running a program compiled with SDK 1.4.2_14 with JRE 1.4.2_08

    Hi,
    Would there ever be a problem running a program compiled in Java 1.4.2_13 with JRE 1.4.2_08?
    Why or why not? No guesses please.
    Thanks

    No such hope. The alternative to testing is to review changes made to each version leading up to 14. This is spelled out in each version's Release Document. There are a lot of changes. Most will not affect your program. Each change is relatively well described, but your problem will be to decide if your program will be affected by the change.
    Or, do nothing, hope like hell that nothing breaks, and have an up-to-date copy of your resume.
    If someone came to me saying a program couldn't be tested, I'd have serious concerns for that person's future.

  • Optimizer bug in C compiler for Linux

    Save the following as bug.c:
    Bug report against Sun C for Linux:
    $ suncc -V
    cc: Sun C 5.9 Linux_i386 Build27_2 2006/08/02
    usage: cc [ options] files.  Use 'cc -flags' for details
    $ cat /etc/SuSE-release
    SuSE Linux 9.3 (x86-64)
    VERSION = 9.3
    $ uname -r
    2.6.11.4-21.8-smp
    Compiled w/ -xO2 or lower, this program runs to completion:
    $ suncc -xO2 bug.c -o bug -lpthread && ./bug
    Hello from thread 0
    Hello from thread 1
    Hello from thread 2
    Hello from thread 3
    DONE.
    However, when compiled w/ -xO3 (or higher) this program hangs:
    $ suncc -xO3 bug.c -o bug -lpthread && ./bug
    Hello from thread 0
    Hello from thread 1
    Hello from thread 2
    Hello from thread 3
    ...hung here...
    ^C
    Changing "#if 0" to "#if 1" changes a "while (cond) {body;}" to a
    "do {body;} while(cond)", and is sufficient to work around the
    problem in this case.
    #include <stdio.h>
    #include <stdlib.h>
    #include <inttypes.h>
    #include <pthread.h>
    static unsigned int numthreads = 4;
        static void test_pthread_barrier(void) {
          static pthread_cond_t barrier_cond[2] =
            { PTHREAD_COND_INITIALIZER, PTHREAD_COND_INITIALIZER };
          static pthread_mutex_t barrier_mutex[2] =
            { PTHREAD_MUTEX_INITIALIZER, PTHREAD_MUTEX_INITIALIZER };
          static volatile unsigned int barrier_count = 0;
          static volatile int phase = 0;
          const int myphase = phase;
          pthread_mutex_lock(&barrier_mutex[phase]);
          barrier_count++;
          if (barrier_count < numthreads) {
    #if 0
            do {
              pthread_cond_wait(&barrier_cond[myphase], &barrier_mutex[myphase]);
            } while (myphase == phase);
    #else
            while (myphase == phase) {
              pthread_cond_wait(&barrier_cond[myphase], &barrier_mutex[myphase]);
    #endif
          } else {
            barrier_count = 0;
            phase = !phase;
            pthread_cond_broadcast(&barrier_cond[!phase]);
          pthread_mutex_unlock(&barrier_mutex[!phase]);
    static void * thread_main(void * arg) {
      printf("Hello from thread %d\n", (int)(uintptr_t)arg);
      test_pthread_barrier();
      return NULL;
    int main(void) {
        int i;
        pthread_t *threadid = (pthread_t *)malloc(sizeof(pthread_t)*numthreads);
        for(i=0;i<numthreads;i++) {
          void *threadarg;
          pthread_attr_t attr;
          pthread_attr_init(&attr);
          pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM); /* ignore failures */
          pthread_create(&threadid, &attr, &thread_main, (void *)(uintptr_t)i);
    pthread_attr_destroy(&attr);
    for(i=0;i<numthreads;i++) {
    void *retval = NULL;
    pthread_join(threadid[i], &retval);
    free(threadid);
    printf("DONE.\n");
    return 0;

    You can refer to this bug as 6499729.
    The bug status will soon be visible on bugs.sun.com

  • JIT / Static compiler for Linux/J2SDK 1.4

    Hello friends,
    Could you please suggest a static / JIT compiler to native code for Linux / J2SDK platform? If you are using one, I would appreciate any comments.
    Thank you.

    Ok, but if you compile a java program directly into an
    executable (thats what I think he's talking about),
    then its always faster than a VM that has to analyze,
    etc first.mkmm... untrue....
    when you want to compile into native code before runtime, then you don't know runtime variables, and you cant optimize out the ones that are for example loaded at the beginning of the program, and will never change.
    but if hotspot dedects that such a case appears, that it has to run some method over and over again, just to return the same value all the time, then it may just substitute that method with the returned value....
    or something like that.... (havent coded any hotspot engine yet, so woun't know for sure ;)

  • Run a Program RFF110S for Automating Payment Program

    Hi Gurus,
    I am trying to use a program RFF110S to automate outgoing payments. Please help me with the steps or the process of setting up or schedulding the auto payment program at regular intervals.
    Also I know that this program is a alternative to use the transaction F110, if anybody know to use it I would appreciate your help.
    Thanks in Advance.
    Best Regards.

    The following reports helps you to schedule a Payment Program :
    - RFF110S  - for the Automatic Scheduling of the Payment Program
    - SAPF110S - Here you have to enter the Run ID and Run Date and specify
                 Proposal or Payment and look for the following options :
                 Menu Options -> Program -> Execute in Background.
    Kindly review the documentation of the program RFF110S through SE38 -> Dcoumentation -> F7.
    Report RFF110S essentially offers the same parameters as are available in transaction F110.
    Once you have defined a variant for the report you can schedule it in the background. By using selection variables for the date field in the variant you can periodically create runs with identical parameters.
    You can use SELECTION VARIABLES for the date fields of your selection screen variant.
    SAP Library:
    http://help.sap.com/saphelp_nw70/helpdata/en/c0/980374e58611d194cc00a0c94260a5/frameset.htm
    The periodic scheduling can be done either using job administration or the Schedule Manager.
    I suppose this should be able to satisfy your requirement.
    Best Regards
    Soumya

  • Programming Editor for Linux

    Does anybody know a good, and feature rich programming editor, written in native code for linux, and designed to develop in Java? All the good editors are written in Java, and unfortunately java applications are still very slow on linux..

    Hi,
    I am using SuSE Linux 8.0 which comes with the KDE GUI. KDE inludes an editor named Kate (among others), which is quite good for editing all sorts of source codes including Java.
    I am using JBuilder on Linux too (which I use the most for Java editing though) and can not confirm however that it is too slow. It works fine.
    Ulrich

  • PL/I compiler for Linux?

    Hello there, I have lately found a book about PL/I that aroused my interest in that language. Now I want to know if there exists a free (as in "costs no money", but free as in "open source" would be even better, of course) compiler for that old language. I have found a project on sourceforge, but it was abandoned at version 0.0.15 at 2007 or so. On another page, I saw a compiler that was advertised for SuSe and Red Hat, but that didn't seem to be free of charge
    Does anyone here know a resource for such a compiler?

    If you look at the CVS changelog, there was activity last year including an update to work with GCC 4.4. Create a PKGBUILD to checkout the CVS tree and see if it works.

  • Is there a way to run a program designed for PC on my Mac?

    I would like to use the Firearms Management System offered by one of my suppliers on my Mac but the only operating system shown to use is with is Windows. Is there a way to run it on my iMac?

    Sure, many:
    (Borrowed from Kappy)
    Windows on Intel Macs
    There are presently several alternatives for running Windows on Intel Macs.
    Install the Apple Boot Camp software.  Purchase Windows XP w/Service Pak2, Vista, or Windows 7.  Follow instructions in the Boot Camp documentation on installation of Boot Camp, creating Driver CD, and installing Windows.  Boot Camp enables you to boot the computer into OS X or Windows.
    Parallels Desktop for Mac and Windows XP, Vista Business, Vista Ultimate, or Windows 7.  Parallels is software virtualization that enables running Windows concurrently with OS X.
    VM Fusionand Windows XP, Vista Business, Vista Ultimate, or Windows 7.  VM Fusion is software virtualization that enables running Windows concurrently with OS X.
    CrossOver which enables running many Windows applications without having to install Windows.  The Windows applications can run concurrently with OS X.
    VirtualBox is a new Open Source freeware virtual machine such as VM Fusion and Parallels that was developed by Solaris.  It is not as fully developed for the Mac as Parallels and VM Fusion.
    Note that Parallels and VM Fusion can also run other operating systems such as Linux, Unix, OS/2, Solaris, etc.  There are performance differences between dual-boot systems and virtualization.  The latter tend to be a little slower (not much) and do not provide the video performance of the dual-boot system. See MacTech.com's Virtualization Benchmarking for comparisons of Boot Camp, Parallels, and VM Fusion. Boot Camp is only available with Leopard or Snow Leopard. Except for Crossover and a couple of similar alternatives like DarWine you must have a valid installer disc for Windows.
    You must also have an internal optical drive for installing Windows. Windows cannot be installed from an external optical drive.

  • Gcc compile for linux from terminal

    Hi all,
    I've usually done my compiling in OSX via terminal with gcc, using a few flags, but as of recently, wanted to build for some linux systems as well and was wondering if it was possible to compile on the mac side using specific flags instead of having to compile them on the linux boxes themselves? What I'm using now:
    gcc -arch ${arch} -mmacosx-version-min=10.4 file.c -o file
    I have a mac on our network specifically for building, recompiling and distribution which is why I'd like to keep it there instead of having to do it on each individual machine...

    You want to cross-compile on the Mac and target Linux? Certainly this is possible, but harder than it looks, and it looks pretty hard. Personally, I would suggest building it on a Linux VM running on the Mac. You'll get the best of both worlds that way.

  • Running OBIEE 11g services for Linux

    Hi everybody,
    I would like to know the way to start OBIEE 11g services in a Linux (Red Hat) machine.
    As far as I have seen in the web, there are four main steps to perform  in order to make OBIEE running:
    Run WebLogic.
    Run NodeManager.
    Run ManagedServer.
    Run OBI Components (using OPMN).
    The problem I have is that in our installation there is no ManagedServer (bi_server1). Therefore I deduce that OBIEE was installed as simple version (actually I don’t know where I can see whether it is simple or enterprise version). So the question in my case is: how to run OBIEE services without ManagedServer? Otherwise, is there any way to upgrade from simple to enterprise version, or I should just uninstall and then install the enterprise version?
    Thanks in advance,
    Hibai.

    Thanks for the reply Sasi. Now I know that we have a Simple Installation.
    Anyway, I'm still not able to make OBIEE available. If I execute the commands you provided me, I see some errors in corresponding created files. However, running them without nohup option and without any other parameter (just the .sh file), WebLogic appears available and OBI components seem to be running as well:
    Processes in Instance: instance1
    ---------------------------------+--------------------+---------+---------
    ias-component                    | process-type       |     pid | status 
    ---------------------------------+--------------------+---------+---------
    coreapplication_obiccs1          | OracleBIClusterCo~ |   11313 | Alive  
    coreapplication_obisch1          | OracleBIScheduler~ |   11312 | Alive  
    coreapplication_obijh1           | OracleBIJavaHostC~ |   11314 | Alive  
    coreapplication_obips1           | OracleBIPresentat~ |   11315 | Alive  
    coreapplication_obis1            | OracleBIServerCom~ |   11311 | Alive
    Am I doing something wrong? In principle the steps you mentioned (which are also those ones that I was executing the previous days) have been executed properly, so I'm a bit confused.
    Thanks again,
    Hibai.

  • Can't run in browser on latest Linux and Mac with Java7u13 JFX2.2.5

    Hi!
    I can't start JavaFX 2.2.5 applications in browser(all possible browsers) in Oracle Linux 6.3 x86 and latest MacOS. I have the latest Java 7 u 13 from Oracle.
    Neither JavaFX Netbeans sample, my applications nor Ensamble(http://download.oracle.com/otndocs/products/javafx/2.2/samples/Ensemble/index.html) work.
    The applications work if I start them as normal apps, but not from the browser.
    Java works perfectly on those systems, just that I can't start JFX 2 in browsers.
    What should be done? My clients need the flexibility of starting their apps from browsers.
    It worked a few versions ago, but now I can't start them. Browsers tell me that I don't have Java. (they show that image with Java that redirects to the page from where I can download Java). I also tried to install just the JRE from that link. I have removed and reinstalled Java.
    Is anyone else facing this problem?
    Any help would be really useful.

    Moreover, trying to run http://java.com/en/download/installed.jsp it fails. It doesn't detect Java neither. It seems that there is a problem with Java Browser Plugin
    The outcome for me was (on Win7+JRE7u13+Firefox17), Oracle's Ensemble sample was accessible from the web . . . your mileage may vary . . .
    The major browser vendors have blocked earlier versions of Java. In my case - windows 7 + jreu11 + firefox - I got spinning blue dots of doom instead of an applet being launched. The blue dots just sit there and spin forever while nothing happens. This occurred for both the Java installation check and the Ensemble sample applet.
    I installed the latest jre offered me from http://java.com, which was java 7u13. When doing this please, remember to uncheck the incredibly stupid default option of also installing the ASK toolbar which is a nasty piece of software.
    Then going back to the java.com installation check page, I get a pop-up that an unsigned applet wants to run (check that it doesn't display behind your browser window). This unsigned applet prompt is displayed by default for JREs newer than jre7u11 in order to combat drive by download attacks using unsigned java applets exploiting security holes in the java runtime. I accepted the warning pop-up and the system was able to detect the Java version: "You have the recommended Java installed (Version 7 Update 13)."
    Then I went back to the Ensemble sample page: http://download.oracle.com/otndocs/products/javafx/2.2/samples/Ensemble/index.html#SAMPLES - this time (after accepting the strange Signed by UNKNOWN dialog), Ensemble launched instead of displaying never ending spinning blue dots.

  • Can I run PowerPC programs on a Intel based Mac?

    I have software that is for PowerPC. Not knowing this I installed it and have been using it with minor problems. Since going to Leopard I've really noticed issues. I didn't realize this til I ran Activity Monitor and noticed all were Intel except this one program. Is this an issue I should be concerned about?

    Hi ananumuss;
    Instead of making us guess what software you are talking about here, why not simply tell us what you are having trouble getting to work on an Intel Mac.
    Allan

  • Sun compiler for linux

    when i was installing compiler everythings have gone well i haven't got any problem my platform is intel 865 chipset

    Hi Alexey,
    The actual code i want to compile is proprietary so will not be able to post it. Anyway the compiler gives the same error on a simple mpi file as below so i dont think it has anything to do with the code i am trying to compile. And as i mentioned earlier the code does compile and run without the -xipo flag.
    ------example.f ------
    program mpi_test
    include 'mpif.h'
    integer ierr
    integer rc
    integer myID
    integer nproc
    integer nslaves
    call mpi_init( ierr )
    call mpi_comm_rank( MPI_COMM_WORLD, myID, ierr )
    call mpi_comm_size( MPI_COMM_WORLD, nProc, ierr )
    nSlaves = nProc-1
    write(*,*) 'I am proc #',myID
    call mpi_finalize(rc)
    end
    Thanks
    Winston

  • USB drive: what format for Linux and Mac?

    I'm wondering what's the best format for an external USB harddrive to be used both on Macs (Tiger and Leopard) and Linux . I'm familiar with Linux, but not much with Mac.
    I'd like to avoid vfat (the MS-DOS format) because symbolic links aren't allowed there.
    Regards,
    Ryo

    Following up my own question, I've formatted the USB drive in hfsplus and it works both on Macs and on my Linux box (Debian testing).
    One issue is that I had to turn off the journaling of the hfsplus filesystem, because (it seems) the Linux hfsplus driver doesn't support writing to the journaled hfsplus filesystem. The earliest discussion I found was from 2005 or 2006, and it's strange that the journaling support has still not been incorporated into the mainstream Linux kernels.
    Without journaling, I have to be extra careful when I remove the drive. This minor annoyance aside, it works.
    But, I'm still open to suggestions. For example, what's the situation of Mac OS X in supporting ext3 or reiserfs?
    Cheers,
    Ryo

  • I'm trying to run a program that says I need mac osx /c firefox +2 - what is +2

    I need to take an online course and pass a test... the course states I need Mac OSX with firefox +2, I don't know what +2 is, I don't think I have it because the course is telling me my system is not compatible. how can I make my system work? If it helps, the course is AHA online PALS course for health care providers.

    You should always use the latest Firefox release to get the latest bug and security patches.
    You can find the full version of the latest Firefox 26.0 release in all languages and for all Operating Systems here:
    *http://www.mozilla.org/en-US/firefox/all.html
    If the current Firefox release isn't working then you need to contact the website and ask them which Firefox versions they support.
    If you can post a link to a public page that doesn't require authentication (login) that generates this error message then we can have a look at it.

Maybe you are looking for