Results 1 to 4 of 4

Thread: Errors compiling program galfit from source (C compiler issue?)

  1. #1
    Join Date
    Jul 2009
    Beans
    11

    Post Errors compiling program galfit from source (C compiler issue?)

    Hi,
    I'm pretty new to Ubuntu, just a few weeks in.


    Anyways I have been unsuccessfully trying to compile a program called “galfit” which was written in C. Whenever I try to compile it I get several errors (listed below) that seem to be relate to my C complier or gcc. I have already installed “build-essential” and I have the latest version of gcc. Galfit is a relativity old program and and it is possible that my version of gcc is too new. When I compile galfit (using “make”) it does create a binary, however it does not work properly. Does anybody have any ideas how to solve my problem?

    EDIT: I have successfully compiled this program on a computer at work which has some version of redhat and GCC 3.4.6 but not on my Ubuntu .


    galfit.c: In function ‘blank_img’:
    galfit.c:284: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘int *’
    galfit.c:284: warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘int *’
    galfit.c:284: warning: format ‘%d’ expects type ‘int’, but argument 5 has type ‘int *’
    galfit.c:284: warning: format ‘%d’ expects type ‘int’, but argument 6 has type ‘int *’


    read_input.c: In function ‘checkpar’:
    read_input.c:130: warning: format ‘%s’ expects type ‘char *’, but argument 4 has type ‘char (*)[1025]’
    read_input.c:150: warning: format ‘%s’ expects type ‘char *’, but argument 4 has type ‘char (*)[10]’


    nrutil.c: In function ‘nrerror’:
    nrutil.c:37: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result


    outmodel.c: In function ‘outmodel’:
    outmodel.c:92: warning: format not a string literal and no format arguments


    keypoll.c: In function ‘keypoll’:
    keypoll.c:27: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result


    fourier.c: In function ‘fourier_pars’:
    fourier.c:18: warning: format ‘%c’ expects type ‘char *’, but argument 3 has type ‘char (*)[10]’


    edgedisk.c: In function ‘edgedisk’:
    edgedisk.c:150: warning: incompatible implicit declaration of built-in function ‘fminf’


    bending.c: In function ‘bending_pars’:
    bending.c:18: warning: format ‘%c’ expects type ‘char *’, but argument 3 has type ‘char (*)[10]’


    initcurses.c: In function ‘initcurses’:
    initcurses.c:65: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result
    initcurses.c: In function ‘port_search’:
    initcurses.c:112: warning: format ‘%s’ expects type ‘char *’, but argument 4 has type ‘char (*)[200]’
    initcurses.c:103: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result
    initcurses.c:120: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result
    Last edited by Shockburner; July 13th, 2009 at 08:26 PM.

  2. #2
    Join Date
    Jan 2007
    Location
    Melbourne, Australia
    Beans
    5,096

    Re: Errors compiling program galfit from source (C compiler issue?)

    Hi, try using the binary one for debian, download it from here
    then change into the directory where the downloaded file is and extract it.
    Code:
    tar xvzf galfit-debian.tar
    Then make the extracted file executable
    Code:
    chmod +x galfit
    then start it with
    Code:
     ./galfit
    Ubuntu Newbie Help: irc: #beginners-help on network irc.freenode.net
    Help others, mark your threads solved.

  3. #3
    Join Date
    Jun 2009
    Location
    /home/renbla
    Beans
    40
    Distro
    Ubuntu 8.04 Hardy Heron

    Smile Re: Errors compiling program galfit from source (C compiler issue?)

    Yeah... Using deb is always the best option if you are not a developer
    I LOVE YOU........
    ...:::::::HUONG:::::::...

  4. #4
    Join Date
    Jul 2009
    Beans
    11

    Re: Errors compiling program galfit from source (C compiler issue?)

    I tried that and it wasn't working for me but I was able to compile the source by using GCC 3.4 and that worked.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •