Re: Foundation-Linux i386 barfs on build- pthread and NSZombieObject?

60 views
Skip to first unread message

Dave Sopchak

unread,
Feb 14, 2013, 6:05:47 PM2/14/13
to cocotr...@googlegroups.com
Ahh...seems I better do this stuff first?



On Thursday, February 14, 2013 11:42:05 AM UTC-8, Dave Sopchak wrote:
Hi all,
Been having great success with Cocotron,building stuff for windows, want to try Linux. Foundation keeps giving an error on build, NSZombieObject can't find <pthread.h> and subsequent errors because of this. pthread.h is in the Windows build headers but not in the Linux build ones. Am I missing something? Looked around to do due diligence, Using XCode 4.6, turned "Find Implicit Dependencies" off as per Chris' instructions.

Thanks for any and all. 

Dave

andyvn22

unread,
Feb 14, 2013, 6:37:07 PM2/14/13
to cocotr...@googlegroups.com
That link is a *great* resource--yes, if there is anything in those instructions that you haven't yet done, then that's most likely the issue. The only change I see is that InstallCDT is now included with the Cocotron source, so you needn't download it separately.

Dave Sopchak

unread,
Feb 15, 2013, 12:12:37 PM2/15/13
to cocotr...@googlegroups.com
I tried moving the files over from a flash disk boot of Ubuntu 12.10, some of the lib files were not there, replaced by links...I tried doing the linky thing once things were moved over. 

Ran ./install.sh Linux i386 from the InstallCDT (I already have cocotron windows install working fine) and make gave me the following below errors

Is it better to toss Developer/Cocotron folder and start from scratch? Also, I'm doing an install of Ubuntu and will see if the files I need to move have changed, maybe they were a little on the light side for the flash drive boot. I didn't want to install unless I was sure I could compile this stuff.

Thanks for any and all, and I'll post my progress or lack thereof.

Dave

In file included from /Developer/Cocotron/1.0/Source/gcc-4.3.1/libgcc/../gcc/libgcc2.c:33:
/Developer/Cocotron/1.0/Source/gcc-4.3.1/libgcc/../gcc/tsystem.h:90:19: error: stdio.h: No such file or directory
/Developer/Cocotron/1.0/Source/gcc-4.3.1/libgcc/../gcc/tsystem.h:93:23: error: sys/types.h: No such file or directory
/Developer/Cocotron/1.0/Source/gcc-4.3.1/libgcc/../gcc/tsystem.h:96:19: error: errno.h: No such file or directory
/Developer/Cocotron/1.0/Source/gcc-4.3.1/libgcc/../gcc/tsystem.h:103:20: error: string.h: No such file or directory
/Developer/Cocotron/1.0/Source/gcc-4.3.1/libgcc/../gcc/tsystem.h:104:20: error: stdlib.h: No such file or directory
/Developer/Cocotron/1.0/Source/gcc-4.3.1/libgcc/../gcc/tsystem.h:105:20: error: unistd.h: No such file or directory
/Developer/Cocotron/1.0/Source/gcc-4.3.1/libgcc/../gcc/tsystem.h:111:18: error: time.h: No such file or directory
make[2]: *** [_muldi3.o] Error 1
make[1]: *** [all-target-libgcc] Error 2
make: *** [all] Error 2


Message has been deleted

Dave Sopchak

unread,
Feb 15, 2013, 2:58:47 PM2/15/13
to cocotr...@googlegroups.com
Hi all,
Looked at the cocotron page:


where Chris sez to put /usr/include in as well, this got me further, but updating XCode 4.6 tools and a reboot (suggested remedies) didn't get me any further, it barfs on 

configure: error: C preprocessor "/lib/cpp" fails sanity check

More detail below. I'm kind of clueless at this point. Any help greatly appreciated.

Dave


Checking multilib configuration for libgcc...
mkdir i386-ubuntu-linux
mkdir i386-ubuntu-linux/libgcc
Configuring in i386-ubuntu-linux/libgcc
configure: creating cache ./config.cache
checking for --enable-version-specific-runtime-libs... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking build system type... i386-apple-darwin12.2.1
checking host system type... i386-ubuntu-linux-gnu
checking for i386-ubuntu-linux-ar... /Developer/Cocotron/1.0/Linux/i386/gcc-4.3.1/i386-ubuntu-linux/bin/ar
checking for i386-ubuntu-linux-lipo... i386-ubuntu-linux-lipo
checking for i386-ubuntu-linux-nm... /Developer/Cocotron/1.0/build/Linux/i386/gcc-4.3.1/./gcc/nm
checking for i386-ubuntu-linux-ranlib... /Developer/Cocotron/1.0/Linux/i386/gcc-4.3.1/i386-ubuntu-linux/bin/ranlib
checking for i386-ubuntu-linux-strip... /Developer/Cocotron/1.0/Linux/i386/gcc-4.3.1/i386-ubuntu-linux/bin/strip
checking whether ln -s works... yes
checking for i386-ubuntu-linux-gcc... /Developer/Cocotron/1.0/build/Linux/i386/gcc-4.3.1/./gcc/xgcc -B/Developer/Cocotron/1.0/build/Linux/i386/gcc-4.3.1/./gcc/ -B/Developer/Cocotron/1.0/Linux/i386/gcc-4.3.1/i386-ubuntu-linux/bin/ -B/Developer/Cocotron/1.0/Linux/i386/gcc-4.3.1/i386-ubuntu-linux/lib/ -isystem /Developer/Cocotron/1.0/Linux/i386/gcc-4.3.1/i386-ubuntu-linux/include -isystem /Developer/Cocotron/1.0/Linux/i386/gcc-4.3.1/i386-ubuntu-linux/sys-include
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /Developer/Cocotron/1.0/build/Linux/i386/gcc-4.3.1/./gcc/xgcc -B/Developer/Cocotron/1.0/build/Linux/i386/gcc-4.3.1/./gcc/ -B/Developer/Cocotron/1.0/Linux/i386/gcc-4.3.1/i386-ubuntu-linux/bin/ -B/Developer/Cocotron/1.0/Linux/i386/gcc-4.3.1/i386-ubuntu-linux/lib/ -isystem /Developer/Cocotron/1.0/Linux/i386/gcc-4.3.1/i386-ubuntu-linux/include -isystem /Developer/Cocotron/1.0/Linux/i386/gcc-4.3.1/i386-ubuntu-linux/sys-include accepts -g... yes
checking for /Developer/Cocotron/1.0/build/Linux/i386/gcc-4.3.1/./gcc/xgcc -B/Developer/Cocotron/1.0/build/Linux/i386/gcc-4.3.1/./gcc/ -B/Developer/Cocotron/1.0/Linux/i386/gcc-4.3.1/i386-ubuntu-linux/bin/ -B/Developer/Cocotron/1.0/Linux/i386/gcc-4.3.1/i386-ubuntu-linux/lib/ -isystem /Developer/Cocotron/1.0/Linux/i386/gcc-4.3.1/i386-ubuntu-linux/include -isystem /Developer/Cocotron/1.0/Linux/i386/gcc-4.3.1/i386-ubuntu-linux/sys-include option to accept ANSI C... none needed
checking how to run the C preprocessor... /lib/cpp
configure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
make[1]: *** [configure-target-libgcc] Error 1
make: *** [all] Error 2
bash-3.2# 

Luca Lutterotti

unread,
Feb 15, 2013, 4:13:04 PM2/15/13
to cocotr...@googlegroups.com
If you check the config.log you will see the problem will be probably due to one of the include file not found. The problem can be that you have some symlink not set or not working, in particular for the gnu, the sys, asm or other.
Try the following:
- delete the folder /Developer/Cocotron/1.0/Linux
- go to /Developer/Cocotron/1.0/PlatformInterfaces/i386-ubuntu-linux/include
- if the folders gnu, bits, sys, asm are present, delete them or rename to something like yyy_or
- create the following symlinks:
ln -s i386-linux-gnu/asm asm
ln -s i386-linux-gnu/gnu gnu
ln -s i386-linux-gnu/bits bits
ln -s i386-linux-gnu/sys sys

these should be the correct include paths. Start again the install.sh Linux i386

Hope it works, it did for me as the I had to recreate all the symlinks also in the lib.

Luca
> --
> You received this message because you are subscribed to the Google Groups "Cocotron Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to cocotron-dev...@googlegroups.com.
> To post to this group, send email to cocotr...@googlegroups.com.
> Visit this group at http://groups.google.com/group/cocotron-dev?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

andyvn22

unread,
Feb 15, 2013, 6:03:47 PM2/15/13
to cocotr...@googlegroups.com
I believe the problem is that /lib/cpp doesn't exist anymore on OS X. I think the quickest way to fix it is just symlink /lib to /usr/bin/, where cpp actually resides.

andyvn22

unread,
Feb 15, 2013, 6:06:50 PM2/15/13
to cocotr...@googlegroups.com
Also--I've never had any trouble with re-running the install script after (many) failures, so I doubt any of your problems would require starting from scratch.

Building the platform interface is always a little difficult, but worth it--keep at it!

Dave Sopchak

unread,
Feb 15, 2013, 7:16:34 PM2/15/13
to cocotr...@googlegroups.com, luca.lu...@ing.unitn.it
Hi Luca!

Thanks a lot. Looks like your trick got me farther:

/Developer/Cocotron/1.0/Linux/i386/gcc-4.3.1/i386-ubuntu-linux/bin/ld: cannot find /lib/i386-linux-gnu/ld-linux.so.2
collect2: ld returned 1 exit status
make[2]: *** [libgcc_s.so] Error 1
make[1]: *** [all-target-libgcc] Error 2
make: *** [all] Error 2

I'll see if I can put in another link and fix this,but the errors are getting to the point where I think I can understand them ;)

Dave Sopchak

unread,
Feb 15, 2013, 7:28:19 PM2/15/13
to cocotr...@googlegroups.com, luca.lu...@ing.unitn.it
Luca,

BTW, I didn't have any gnu, bits, sys or asm folders. I put in your sym links. I re-did all my sym links as well in /lib, and thought they worked- here's how ls -l lists the one in question:

-rwxr-xr-x  1 dave  admin   134376 Feb 15 09:50 ld-2.15.so
lrwxr-xr-x  1 dave  admin       10 Feb 15 09:55 ld-linux.so.2 -> ld-2.15.so

...kind of makes me wonder if I should create a link to /lib in /lib: ln -s  lib/i386-linux-gnu i386-linux-gnu

..but couldn't that cause some recursion trouble? I need to think about this some more.

Message has been deleted

Dave Sopchak

unread,
Feb 15, 2013, 10:00:15 PM2/15/13
to cocotr...@googlegroups.com
Hi Andy,

Thanks for your reply. Are you saying I should put a link to /usr/bin (root level) on my machine in the /lib folder in platformInterfaces in linux in Cocotron? I'm not the greatest with links at the moment, but I'm willing to learn.

Dave

andyvn22

unread,
Feb 16, 2013, 12:32:27 AM2/16/13
to cocotr...@googlegroups.com
I'm saying that the cpp "sanity" issue can be caused by a complete failure to find the file--check to see if /lib/ (root level) exists at all on your machine. If it doesn't, and you run into that same cpp-related "sanity check" error, then (from root level) ln -s /usr/bin lib is a quick hack to make sure that when the script goes looking for /lib/cpp, it finds /usr/bin/cpp, which actually exists. (This is a problem I ran into on newer versions of OS X. If *your* /lib/cpp already exists, or if you never run into that "sanity check" error message again, then lucky you!)

Dave Sopchak

unread,
Feb 16, 2013, 1:03:01 AM2/16/13
to cocotr...@googlegroups.com
Hi Andy,
thanks. Yes, I have /usr/bin. I'll give it a try! Thanks for the clarification.

Dave Sopchak

unread,
Feb 16, 2013, 1:04:08 PM2/16/13
to cocotr...@googlegroups.com
Hi folks,
After following Luca's and Andy's advice and putting in some sym links in, along with another of my own which allowed the install.sh to complete:

ln -s

/Developer/Cocotron/1.0/PlatformInterfaces/i386-ubuntu-linux/include/i386-linux-gnu /usr/lib/i386-linux-gnu

...whether or not this is correct it allowed the CDT tools install to complete for Linux i386.

Now I'm back to trying to build Foundation, and it gives me the same error-

/Users/dave/Projects/cocotron/Foundation/NSObject/NSZombieObject.m:13: Pthread.h: No such file or directory

If I put in a specific path to pthread.h like

#include "/Developer/Cocotron/1.0/Linux/i386/gcc-4.3.1/i386-ubuntu-linux/include/pthread.h"

it will take this but gives me a million other "cant find xxx.h" errors, so am I specifying the wrong search path?

Closer than ever...thanks for any advice.

Dave
Reply all
Reply to author
Forward
0 new messages