Post New Topic  Post A Reply
my profile | register | search | faq | forum home
  next oldest topic   next newest topic
» MacOSX - forked.net   » Compile Problems   » fixes to common problems

UBBFriend: Email this page to someone!    
Author Topic: fixes to common problems
apex
Administrator
Member # 1

posted August 05, 2001 11:15 AM      Profile for apex   Email apex   Send New Private Message      Edit/Delete Post  Reply With Quote 

  1. Error: Undefined Macro argument list;
    Fix: Add -no-cpp-precomp to CFLAGS in Makefile.

  2. Error: configure: error: can not guess host type; you must specify one
    Fix: Replace config.sub and config.guess with the ones from /usr/libexec and then remove config.cache.

[ August 06, 2001: Message edited by: apex ]


Posts: 307 | From: Alaska | Registered: Aug 2001  |  IP: Logged
jasont
Member
Member # 16

posted August 14, 2001 05:49 AM      Profile for jasont     Send New Private Message      Edit/Delete Post  Reply With Quote 
Error 3: gcc called cross compiler without reference. Use --build=powerpc-apple-bsd or whatever you want instead of --host=...

Error 4: My unix applications keep crashing? Why??? Set the Compiler flags w/ env or using bash to utilize the functions required in the readme. This is ESPECIALLY important for mysql since the version of gcc (called cc) in mac os x supports felide constructors.


Posts: 50 | From: Palo Alto, CA | Registered: Aug 2001  |  IP: Logged
jasont
Member
Member # 16

posted August 14, 2001 06:11 AM      Profile for jasont     Send New Private Message      Edit/Delete Post  Reply With Quote 
Error 5: During Make my compiler stopped after ranlib with a message about symbols. Compilers usually cache their build (the .h files become .o files and the compiler continues from the last point when you run make again.) Sometimes (and for no reason I can figure out) the Make file will try to ranlib a lib and then drop out. To remedy this ranlib <filename> and then type make again (this won't always work, but it does a lot of the time).
Posts: 50 | From: Palo Alto, CA | Registered: Aug 2001  |  IP: Logged
jasont
Member
Member # 16

posted August 15, 2001 05:41 PM      Profile for jasont     Send New Private Message      Edit/Delete Post  Reply With Quote 
6.
Error: gcc doesn't work from the command line.
Reason: Apple has gcc installed as cc
Solution: Make symbolic links for gcc to and g++ to the standard locations
code:

Make sure you have the directories:
/usr/local/bin
Check with ls /usr/local and ls /usr/local/bin
If not you want to create them with:
mkdir /usr/local
mkdir /usr/local/bin

Make symbolic links
ln -s /usr/bin/cc /usr/bin/gcc
ln -s /usr/bin/c++ /usr/bin/g++
ln -s /usr/bin/cc /usr/local/bin/gcc
ln -s /usr/bin/c++ /usr/local/bin/g++

*you may want to do this as root*



Posts: 50 | From: Palo Alto, CA | Registered: Aug 2001  |  IP: Logged
apex
Administrator
Member # 1

posted August 15, 2001 07:00 PM      Profile for apex   Email apex   Send New Private Message      Edit/Delete Post  Reply With Quote 
7.

  • Error: Command not found: make [6]

    Fix: Install Apple's Developer Tools
    Note: you can upgrade to the latest Dev Tools version from connect.apple.com

    [ August 16, 2001: Message edited by: apex ]


    Posts: 307 | From: Alaska | Registered: Aug 2001  |  IP: Logged
  • jasont
    Member
    Member # 16

    posted August 16, 2001 05:03 AM      Profile for jasont     Send New Private Message      Edit/Delete Post  Reply With Quote 
    8
    • Error: ./configure with every path you can think of specified keeps asking for a library or header file inside of a directory. This frequently occurs when including build directories.
    • Solution: inside your build directory create a lib and an include directory. Placing libs in the lib one and all header files inside the include one. I recommend copying the files in there, but you may achieve success if you symbolically link them or move them in there.

    Posts: 50 | From: Palo Alto, CA | Registered: Aug 2001  |  IP: Logged
    apex
    Administrator
    Member # 1

    posted August 16, 2001 07:47 AM      Profile for apex   Email apex   Send New Private Message      Edit/Delete Post  Reply With Quote 
    9.

  • Error: Your compile stops because it cannot find the header file malloc.h

    Fix:

    code:
    touch malloc.h

    Apple has included this functionality elsewhere so we create a dummy file to satisfy the programs dependencies. Alternatively you can edit the source and remove the statement:

    code:
    #include <malloc.h>

    [ August 16, 2001: Message edited by: apex ]


    Posts: 307 | From: Alaska | Registered: Aug 2001  |  IP: Logged
  • jasont
    Member
    Member # 16

    posted August 16, 2001 08:19 AM      Profile for jasont     Send New Private Message      Edit/Delete Post  Reply With Quote 
    Optionally you can grab it from any of these locations:

    /System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/malloc.h

    /usr/include/objc/malloc.h

    /usr/include/sys/malloc.h


    Posts: 50 | From: Palo Alto, CA | Registered: Aug 2001  |  IP: Logged
    jasont
    Member
    Member # 16

    posted August 19, 2001 06:30 AM      Profile for jasont     Send New Private Message      Edit/Delete Post  Reply With Quote 
    10
    • Error:
      I told configure where a file/lib/binary/header was, put lib and include dirs in my build tree and I still get something like:
      code:

      checking for <option/file>.....no

    • Fix:
      Some configuration scripts wander down an application specific source tree when you specify an option. For example, if you specify --something=/usr/local/include the configure script may look for /usr/local/include/somedir/another/something or ever worse /usr/local/include/local/include/somedir/another/something.

      To fix this you need to either know exactly what configure is looking for or edit the file. Fortunately configuration scripts are USUALLY layed out in blocks where the screen message almost directly precedes the test. So if your option was --with-sysctl then your best bet is to search for sysctl, look beneath is and see the structure it's looking for, then either edit it, feed it the right arguments, or alter the requested files location.


    -j

    Posts: 50 | From: Palo Alto, CA | Registered: Aug 2001  |  IP: Logged
    jasont
    Member
    Member # 16

    posted August 20, 2001 12:08 AM      Profile for jasont     Send New Private Message      Edit/Delete Post  Reply With Quote 
    11: Build Location
    • Error: Configure check complains about build directory location. You won't come across this often, but if you do the fix is simple

    • Fix: As root unpack the archive you are building in /

    -j3

    Posts: 50 | From: Palo Alto, CA | Registered: Aug 2001  |  IP: Logged
    jasont
    Member
    Member # 16

    posted September 05, 2001 08:12 AM      Profile for jasont     Send New Private Message      Edit/Delete Post  Reply With Quote 
    12: 'uint32_t' undeclared
    • Error: Item is declared differently on platform
    • Fix: replace uint32_t with u_int32_t (this is qnd)

    Posts: 50 | From: Palo Alto, CA | Registered: Aug 2001  |  IP: Logged
    apex
    Administrator
    Member # 1

    posted October 11, 2001 09:26 PM      Profile for apex   Email apex   Send New Private Message      Edit/Delete Post  Reply With Quote 
    13: Undefined Symbols:
    _strtok_r

    Fix:
    Try replacing all occurances of strok_r() with strtok(). You will need to remove the last argument from strtok_r() when you change it.
    code:

    grep -r strtok_r src/


    sample:
    code:

    token = strtok_r(NULL, " ", &blah);


    becomes
    code:

    token = strtok(NULL, " ");

    14: definition of sys_errlist
    Edit the code around line 265 of /usr/include/stdio.h so that it looks like this:

    code:

    #ifdef mygnudarwindef
    extern __const char *__const sys_errlist[];
    #endif


    A similar switch can be installed for the bzero definition, if that gives you problems. When you want it to go back to the normal definition, change the ifdef to ifndef.

    14: pthread
    You may get errors that say you do not have threading on your system.
    Edit your Makefiles and remove the "-lpthread" flag from them.
    Darwin has threading capability built-into the OS, it doesn't use an external library.

    [ October 11, 2001: Message edited by: apex ]


    Posts: 307 | From: Alaska | Registered: Aug 2001  |  IP: Logged

    All times are Pacific Time  

    Post New Topic  Post A Reply Close Topic    Move Topic    Delete Topic next oldest topic   next newest topic
    Hop To:

    Contact Us | macosx.forked.net

    Powered by Infopop Corporation
    Ultimate Bulletin BoardTM 6.1.0.2