cwalls251 / iphone-dev

Automatically exported from code.google.com/p/iphone-dev
0 stars 0 forks source link

odcctools build fails on FreeBSD #27

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Build as per instructions
2. Everything works, except odcctools

What is the expected output? What do you see instead?

Expected it to compile.  Instead, after running:

$ pushd odcctools
$ ./configure --target=arm-apple-darwin --disable-ld64
$ make

...I got:

In file included from /usr/include/stdlib.h:42,
                 from allocate.c:23:
/usr/include/sys/_types.h:99: error: conflicting types for '__mbstate_t'
..//include/i386/_types.h:74: error: previous declaration of '__mbstate_t'
was here
In file included from allocate.c:23:
/usr/include/stdlib.h:52: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'size_t'
/usr/include/stdlib.h:89: error: expected declaration specifiers or '...'
before 'size_t'

What version of the product are you using? On what operating system?

FreeBSD 7.0-CURRENT, amd64.

Please provide any additional information below.

Every other step works fine, except this one.  So close!

Original issue reported on code.google.com by brooksta...@gmail.com on 13 Sep 2007 at 4:50

GoogleCodeExporter commented 8 years ago
Looks to be the same issue as
http://code.google.com/p/iphone-dev/issues/detail?id=14&colspec=ID%20Type%20Stat
us%20Opsys%20Priority%20Owner%20Summary

Original comment by brooksta...@gmail.com on 13 Sep 2007 at 5:24

GoogleCodeExporter commented 8 years ago
I've seen an error like this before, back before odcctools could compile on 
linux.

Original comment by Phi...@gmail.com on 13 Sep 2007 at 5:26

GoogleCodeExporter commented 8 years ago
Try building in a 32 bit chroot, if the error stays, then its not related to 
issue 14.

Original comment by Phi...@gmail.com on 13 Sep 2007 at 6:00

GoogleCodeExporter commented 8 years ago

Original comment by nightwat...@gmail.com on 13 Sep 2007 at 5:05

GoogleCodeExporter commented 8 years ago
I'm having trouble getting a 32 bit chroot going, but I have confirmed that all 
of
the errors stem from unknown 64 bit types in /usr/include/sys/types.h.  
Anything like
int64_t or uint64_t is throwing an error.  I suspect it is the same thing as 
issue 14.

I'll fight with chroot and see if I can get that going.

Original comment by brooksta...@gmail.com on 13 Sep 2007 at 5:14

GoogleCodeExporter commented 8 years ago
Those 64-bit errors are a duplicate of issue 37. I'll take a look.

Original comment by nightwat...@gmail.com on 15 Sep 2007 at 2:52

GoogleCodeExporter commented 8 years ago
Hmmf, same problem on a pure, fresh install of i386 BSD.  The specific error 
changes 
because many things that were defineed as int64_t on amd64 are int32_t on i386. 
 But 
the same problems.

The issue seems to stem from conflicts between odcctools/include/i386/types.h 
and 
BSD's /usr/include/sys/types.h.  I've tried just symlinking odcc's versions 
back to 
BSD's but that throws a million errors.  

I'll switch to a 32 bit Linux tomorrow.

Original comment by brooksta...@gmail.com on 15 Sep 2007 at 7:43

GoogleCodeExporter commented 8 years ago
Bah, screw it.  I ended up picking up a mac mini just to be done with it.  I do 
still
have both freebsd amd64 and i386 around, so if you need any info from them I'm 
happy
to help.

Thanks for all of your hard work!

Original comment by brooksta...@gmail.com on 15 Sep 2007 at 8:30

GoogleCodeExporter commented 8 years ago
i also try to build it on a freebsd, and could get past the first 2 errors :

first i got this:

In file included from /usr/include/stdlib.h:42,
                 from ../../../odcctools/libstuff/allocate.c:30:
/usr/include/sys/_types.h:98: error: conflicting types for '__mbstate_t'
../../../odcctools/include/i386/_types.h:74: error: previous declaration of
'__mbstate_t' was here

This comes from a conflict between odcctools's mbstate_t type, and the bsd's
similarly named type. Could resolve it by renaming odcctools's type (as it 
isn't used
outside the file)
that is, in 
/usr/home/eino/iphone/toolchain/iphone-dev/odcctools/include/i386/_types.h :
on lines 74 and 75, changed mbstate_t to mbstate_t_ocdtools

New compilation brought the second problem:

In file included from ../../../odcctools/libstuff/allocate.c:30:
/usr/include/stdlib.h:53: error: syntax error before "size_t"
/usr/include/stdlib.h:89: error: syntax error before "size_t"
/usr/include/stdlib.h:90: error: syntax error before ')' token
...

This comes from diverse types (like __ssize_t) not defined in odcctools' 
version of
machine/_types.h
I could bypass this by using BSD's version; that is, i renamed
_types.h to UNUSED_types.h
in directory
/usr/home/eino/iphone/toolchain/iphone-dev/odcctools/include/foreign/machine

Now, have an error about it not finding sys/appleapiopts.h. But i guess i have 
to
link to xcode. I'll tell more when i can get further.

Original comment by eino.gou...@gmail.com on 19 Jan 2008 at 10:50

GoogleCodeExporter commented 8 years ago
hello, i have the same problems. I appreciate your work, good luck trying to 
bring 
it up on freebsd :)

Original comment by socke...@gmail.com on 21 Jan 2008 at 12:55

GoogleCodeExporter commented 8 years ago
hi good morning.......

  i am getting an error like 
   error: syntax error before "size_t"
   error: syntax error before "size_t"

when i am writng an driver to open for a device rs-232...
   the command was 
    int  rs_open (strct file *filp, char *buf, size_t count, loff_t *t)

  thanks in advance for any suggestiong......

Original comment by desai...@gmail.com on 1 Feb 2008 at 4:29

GoogleCodeExporter commented 8 years ago
Isn't this because we in FreeBSD land are using a different include tree to you 
in
Linux land?  I had a very similar problem in Cinelerra, and fetching a Linux 
include
tree from my Fedora 7 install seemed to work.

GCC is another matter, though...

Original comment by jashank....@gmail.com on 17 Mar 2008 at 8:50