Menu

Can't compile on FreeBSD

Help
2007-03-09
2016-08-08
  • Nobody/Anonymous

    Hi!
    I am interested in developing Motif applications; EasyMotif would be a great help. Unfortunately I can not install it on my system (FreeBSD 6.2)
    when I run make I get the following error:


    make
    making all in ./include...
    making all in ./template...
    making all in ./Doc...
    making all in ./lib...
    making all in lib/PD...

    (...)

    In file included from Whistspectr.c:86:
    ../.././/include/values.h:26:22: features.h: No such file or directory
    ../.././/include/values.h:55:1: warning: "MAXFLOAT" redefined
    In file included from Whistspectr.c:84:
    /usr/include/math.h:152:1: warning: this is the location of the previous definition
    *** Error code 1

    Stop in /root/EasyMotif/lib/PD.
    *** Error code 1

    Stop in /root/EasyMotif/lib.
    *** Error code 1

    Stop in /root/EasyMotif.

     
    • Juergen Keidel

      Juergen Keidel - 2007-03-20

      Hi,
      I put a new new release online with several changes regarding your problems under FreeBsd. Please try this version and send me the compile log. Nay be there some more problems hidden. (If FreeBsd does not know some signals, pease comment these lines out (these may appear in "activate_crash_save" ).

      Thank you for your help
      J.Keidel

       
    • Juergen Keidel

      Juergen Keidel - 2007-03-10

      Hi,
      First, I'm sorry, I can't check this problem, as I don't have FreeBsd. But the included file (values.h) is added for completion only, under Linux it is a system header file. So try to wipe out the #include for it and try again. May be you should replace the include by an include to your system header file (limits.h and/or float.h) It is used to get the values limits for float.
      Lokk for MAXFLOAT in your /usr/include/ directory to find the header-file.
      May be there some more references to such files....
      Tell me please if this may result in success and tell me how I can check for FreeBSD for compiling. I will use your mods then for correcting.
      If this gives no success, try deleting the line with HasPD in the config file. This will disable all public domain widgets for EasyMotif,

      You would give me a great help by trying this and reporting.
      Thank you
      J.Keidel

       
    • Nobody/Anonymous

      I downloaded features.h and stubs.h to my include folders (/usr/include, /usr/include/gnu). I also disabled PD (I erased HasPD from config file).
      make now displays something like this:


      make EasyMotif

      gcc -c -O2 -fno-strict-aliasing -pipe -DLINUX -DPSPLOT -USAVE_COMPRESS -I.//include/ -I.//include/PD/ -I/usr/X11R6/include -DCSRG_BASED -DFUNCPROTO=15 -DNARROWPROTO EasyMotif.c -o ./EasyMotif.o
      In file included from /usr/include/features.h:320,
      from .//include/values.h:26,
      from .//include/psplot.h:22,
      from EasyMotif.c:72:
      /usr/include/gnu/stubs.h:7:22: lisptype.h: No such file or directory
      In file included from /usr/include/features.h:320,
      from .//include/values.h:26,
      from .//include/psplot.h:22,
      from EasyMotif.c:72:
      /usr/include/gnu/stubs.h:40: error: syntax error before '<' token
      /usr/include/gnu/stubs.h:41: error: syntax error before "aSize"
      /usr/include/gnu/stubs.h: In function PlatAllocN': /usr/include/gnu/stubs.h:41: error:T' undeclared (first use in this function)
      /usr/include/gnu/stubs.h:41: error: (Each undeclared identifier is reported only once
      /usr/include/gnu/stubs.h:41: error: for each function it appears in.)
      /usr/include/gnu/stubs.h:41: error: syntax error before ')' token
      /usr/include/gnu/stubs.h:64:21: stubs.inl: No such file or directory
      In file included from .//include/psplot.h:22,
      from EasyMotif.c:72:
      .//include/values.h:55:1: warning: "MAXFLOAT" redefined
      In file included from EasyMotif.c:42:
      /usr/include/math.h:152:1: warning: this is the location of the previous definition
      EasyMotif.c: At top level:
      EasyMotif.c:8504: error: syntax error before "if"
      *** Error code 1

      Stop in /root/EasyMotif.


      It seems impossible to compile EasyMotif under FreeBSD.

      P.S. Maybe you should make compiled binaries available for download. (FreeBSD has ability to execute linux binaries)

       
    • Nobody/Anonymous

      I tried to compile it again:

      *I downloaded also lisptype.h and stubs.inl.
      Now "xmkmf- a" did not returned any errors at all.

      *I removed #include<values.h> Whistspectr.c and it compiled whithout problem.

      *The make stopped at libXmind.c. I removed the "#include<values.h>" and got the following:

      gcc -c -O2 -fno-strict-aliasing -pipe -DPD -I.././/include/ -I.././/include/PD/ -I/usr/X11R6/include -DCSRG_BASED -DFUNCPROTO=15 -DNARROWPROTO libXmind.c
      libXmind.c: In function MCreateAnimButton': libXmind.c:194: error:MAXINT' undeclared (first use in this function)
      libXmind.c:194: error: (Each undeclared identifier is reported only once
      libXmind.c:194: error: for each function it appears in.)
      libXmind.c: In function DrawnButtonCb': libXmind.c:396: warning: passing arg 3 ofXCreateGC' makes integer from pointer without a cast
      libXmind.c: In function PixmapButtonCb': libXmind.c:445: warning: passing arg 3 ofXCreateGC' makes integer from pointer without a cast
      libXmind.c: In function AnimButtonCb': libXmind.c:509: warning: passing arg 3 ofXCreateGC' makes integer from pointer without a cast
      *** Error code 1

      Stop in /root/EasyMotif/lib.
      *** Error code 1

      Stop in /root/EasyMotif.


      I tried to compile it using #include <float.h> and <limits.h>, but without success. It needs MAXINT! What to do?

       
    • Nobody/Anonymous

      *changed:

      ifndef CYGWIN

      include <float.h>

      else

      define MAXINT 0x7fffffff

      endif


      to

      define MAXINT 0x7fffffff

      it compiled

      *
      psplot.h -> //#include<values.h>

      psplot.c ->
      I needed to add a define for MINFLOAT
      I defined it like this: #define MIFLOAT 0
      It compiled with warnings:


      gcc -c -O2 -fno-strict-aliasing -pipe -DPD -I.././/include/ -I.././/include/PD/ -I/usr/X11R6/include -DCSRG_BASED -DFUNCPROTO=15 -DNARROWPROTO psplot.c
      psplot.c: In function PS_pageanno': psplot.c:1814: warning: passing arg 2 ofstrcpy' makes pointer from integer without a cast


      make stopped at EasyMotif.c

      gcc -c -O2 -fno-strict-aliasing -pipe -DPSPLOT -USAVE_COMPRESS -I.//include/ -I.//include/PD/ -I/usr/X11R6/include -DCSRG_BASED -DFUNCPROTO=15 -DNARROWPROTO EasyMotif.c -o ./EasyMotif.o
      EasyMotif.c:8504: error: syntax error before "if"
      EasyMotif.c:8524: error: syntax error before "if"
      EasyMotif.c:8550: error: syntax error before "if"
      EasyMotif.c: In function activate_crash_save': EasyMotif.c:13485: error:SIGPWR' undeclared (first use in this function)
      EasyMotif.c:13485: error: (Each undeclared identifier is reported only once
      EasyMotif.c:13485: error: for each function it appears in.)


      I commented (/ /) line EasyMotif.c:13485 and lines from 8504 to 8595
      and it compiled. But those lines need to repaired anyway!


      FINALLY:
      gcc -o EasyMotif -DPSPLOT -USAVE_COMPRESS -L/usr/X11R6/lib GRED.o EasyMotif.o Brainstorm_C.o Brainstorm_create.o Workbench.o WED.o WED_special.o Text_editor.o Brainstorm_cb.o file.o parse.o Brainstorm_savres.o RED.o res_enum.o Menus.o Brainstorm_doc.o Clipboard.o browser.o Brainstorm_print.o fparse.tab.o file_c.o file_uil.o editor.o regularExp.o text.o textBuf.o textDisp.o textDrag.o textSel.o printhighlight.o Printselect.o line.o .//lib/libeasymotif.a .//lib/libpsplot.a -lXm -lXp -lXmu -lXpm -lXt -lX11 -lXext -lm -lz -lc -Wl,-rpath,/usr/X11R6/lib
      .//lib/libeasymotif.a(wid_funcs.o)(.text+0x257): In function MTextSetInt': : undefined reference toltoa'
      .//lib/libpsplot.a(psplot.o)(.text+0x4d1a): In function PS_pageanno': : undefined reference tocuserid'
      *** Error code 1

      Stop in /root/EasyMotif.
      freebsd#

       
  • John D. Hendrickson

    all these problems above are the same: missing (and or broken) libc headers

    first try this:

    edit TOP/config and #undef CYGWIN (see below), also undef all the optional features to make the attempt simpler.

    edit TOP/config: to INCLUDES add:

    -IfreeBSD_path_to/usr/libc/include -IfreeBSD_path_to/usr/Motif/include -IfreeBSD_path_to/usr/X11/include/X11/..

    do the same in TOP/Imakefile, then run:

    $ export EasyMotif=/usr/local/bin
    $ xmkmf -a
    $ make clean
    $ make


    all these problems are the same: missing (and or broken) libc headers

    i would say your libc headers are improperly installed or damaged from mis-use

    features.h is NOT included by imake or EasyMotif, but by your own broken (gcc or libc) make system.

    hacking in MAXINT doesnt fix anything and likely is a landmine for other problems

    re-install freeBSD. check if you are using gcc or which compiling environment. you might not be using gcc but you can't use BSD make "pmake" (ie, you need make-3.80)


    CYGWIN is for building free unix wares on Microsoft proprietar products

    Why are you saying freeBSD then #define CYGWIN ??


    finally, using gcc try

    gcc -v hello.c

    it shows the compiling envrionment gcc is using (gcc's paths and libexec paths default arch, include path and inner .o, libc's path default, if cpp is found and used, all default options, the same for the (as) assembler step, and (ld) linking step too)

     

    Last edit: John D. Hendrickson 2016-08-08

Anonymous
Anonymous

Add attachments
Cancel