mettli / libjingle

Automatically exported from code.google.com/p/libjingle
0 stars 0 forks source link

Issues building libjingle on MacOS 10.7 #340

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi Peter,

I'm trying to build libjingle under Mac OS X 10.7.3, but there are some issues 
I ran into. At first the libsrtp does not configure, it always fails when 
checking the size of unsigned long and unsigned long long:

checking for unsigned long... yes
checking size of unsigned long... configure: error: cannot compute sizeof 
(unsigned long)

I was able to get past that by removing these checks from the configure file. 
The next error occurs when expat should be built:

scons: Reading SConscript files ...

scons: warning: The build_dir keyword has been deprecated; use the variant_dir 
keyword instead.
File "/usr/local/lib/swtoolkit/site_scons/site_init.py", line 203, in 
BuildEnvironmentSConscripts
scons: done reading SConscript files.
scons: Building targets ...
________Compiling build/dbg/obj/third_party/expat-2.0.1/lib/xmlparse.o
third_party/expat-2.0.1/lib/xmlparse.c:6:65: error: string.h: No such file or 
directory
third_party/expat-2.0.1/lib/xmlparse.c:7:20: error: assert.h: No such file or 
directory
In file included from third_party/expat-2.0.1/lib/xmlparse.c:24:
third_party/expat-2.0.1/lib/expat.h:17:20: error: stdlib.h: No such file or 
directory
cc1: warnings being treated as errors
third_party/expat-2.0.1/lib/xmlparse.c: In function ‘parserCreate’:
third_party/expat-2.0.1/lib/xmlparse.c:719: warning: implicit declaration of 
function ‘malloc’
third_party/expat-2.0.1/lib/xmlparse.c:719: warning: incompatible implicit 
declaration of built-in function ‘malloc’
third_party/expat-2.0.1/lib/xmlparse.c:723: error: ‘realloc’ undeclared 
(first use in this function)
third_party/expat-2.0.1/lib/xmlparse.c:723: error: (Each undeclared identifier 
is reported only once
third_party/expat-2.0.1/lib/xmlparse.c:723: error: for each function it appears 
in.)
third_party/expat-2.0.1/lib/xmlparse.c:724: error: ‘free’ undeclared (first 
use in this function)
third_party/expat-2.0.1/lib/xmlparse.c: In function ‘parserInit’:
third_party/expat-2.0.1/lib/xmlparse.c:848: warning: implicit declaration of 
function ‘memset’
third_party/expat-2.0.1/lib/xmlparse.c:848: warning: incompatible implicit 
declaration of built-in function ‘memset’
third_party/expat-2.0.1/lib/xmlparse.c: In function ‘XML_Parse’:
third_party/expat-2.0.1/lib/xmlparse.c:1543: warning: implicit declaration of 
function ‘memcpy’
third_party/expat-2.0.1/lib/xmlparse.c:1543: warning: incompatible implicit 
declaration of built-in function ‘memcpy’
third_party/expat-2.0.1/lib/xmlparse.c: In function ‘XML_GetBuffer’:
third_party/expat-2.0.1/lib/xmlparse.c:1627: warning: implicit declaration of 
function ‘memmove’
third_party/expat-2.0.1/lib/xmlparse.c:1627: warning: incompatible implicit 
declaration of built-in function ‘memmove’
third_party/expat-2.0.1/lib/xmlparse.c:1656: warning: incompatible implicit 
declaration of built-in function ‘memcpy’
third_party/expat-2.0.1/lib/xmlparse.c: In function ‘XML_GetParsingStatus’:
third_party/expat-2.0.1/lib/xmlparse.c:1750: warning: implicit declaration of 
function ‘assert’
third_party/expat-2.0.1/lib/xmlparse.c: In function ‘storeRawNames’:
third_party/expat-2.0.1/lib/xmlparse.c:2009: warning: incompatible implicit 
declaration of built-in function ‘memcpy’
third_party/expat-2.0.1/lib/xmlparse.c: In function ‘doContent’:
third_party/expat-2.0.1/lib/xmlparse.c:2424: warning: implicit declaration of 
function ‘memcmp’
third_party/expat-2.0.1/lib/xmlparse.c: In function ‘storeAtts’:
third_party/expat-2.0.1/lib/xmlparse.c:2922: warning: incompatible implicit 
declaration of built-in function ‘memcpy’
third_party/expat-2.0.1/lib/xmlparse.c:2931: warning: incompatible implicit 
declaration of built-in function ‘memcpy’
third_party/expat-2.0.1/lib/xmlparse.c: In function ‘addBinding’:
third_party/expat-2.0.1/lib/xmlparse.c:3039: warning: incompatible implicit 
declaration of built-in function ‘memcpy’
third_party/expat-2.0.1/lib/xmlparse.c: In function ‘lookup’:
third_party/expat-2.0.1/lib/xmlparse.c:5871: warning: incompatible implicit 
declaration of built-in function ‘memset’
third_party/expat-2.0.1/lib/xmlparse.c:5898: warning: incompatible implicit 
declaration of built-in function ‘memset’
third_party/expat-2.0.1/lib/xmlparse.c:5927: warning: incompatible implicit 
declaration of built-in function ‘memset’
third_party/expat-2.0.1/lib/xmlparse.c: In function ‘poolGrow’:
third_party/expat-2.0.1/lib/xmlparse.c:6112: warning: incompatible implicit 
declaration of built-in function ‘memcpy’
third_party/expat-2.0.1/lib/xmlparse.c:6148: warning: incompatible implicit 
declaration of built-in function ‘memcpy’
scons: *** [build/dbg/obj/third_party/expat-2.0.1/lib/xmlparse.o] Error 1
scons: building terminated because of errors.

I seems unable to find any standard library for some reason…

Do you know what may be the problem here?

Best regards

Original issue reported on code.google.com by juberti@google.com on 2 May 2012 at 10:15

GoogleCodeExporter commented 9 years ago

Original comment by ronghuawu@google.com on 7 May 2012 at 6:44

GoogleCodeExporter commented 9 years ago
I was setting up the environment from a brand new Lion (10.7) machine and had 
some similar problem with the SDK. Turns out when you install the xcode from 
the app store (assume that is also what you did), a) the command line tools 
(gcc etc) won't be installed, b) the SDK is not installed under the /Developer 
folder. For that we should: (Should add them to 
TipsOfBuildingLibjingleOnMac107.)
1) Install the command line tools from Xcode's Preferences/Downloads menu.
2) Map the SDK to the /Developer folder. (Might be other ways)
sudo mkdir /Developer
sudo ln -s 
/Applications/Xcode.app/Content/Developer/Platforms/MacOSX.platform/Developer/SD
Ks /Developer/SDKs

I didn't have a problem configure the expat and srtp. But the expat_config.h I 
got is under the third_party/expat-2.0.1/ folder, which I have to add to the 
libjingle.scons. If this is the case for you also, we should update our script.

I also followed the instructions in 
http://code.google.com/p/libjingle/wiki/TipsOfBuildingLibjingleOnMac107. I 
believe you did that also.

After all these, I was able to build under 10.7.

Original comment by ronghuawu@google.com on 7 May 2012 at 10:43

GoogleCodeExporter commented 9 years ago
I think we need to fix the libjingle.scons to not require the manual steps 
listed in your comment. We should be able to have developers checkout and build 
without having to do a lot of tweaks.

Original comment by juberti@google.com on 8 May 2012 at 1:36

GoogleCodeExporter commented 9 years ago
I had the "unsigned long" issue as well and got around it by doing the 
following to configuring srtp

CFLAGS="--sysroot=/Developer/SDKs/MacOSX10.7.sdk -mmacosx-version-min=10.5 
-arch i386" LDFLAGS="--sysroot=/Developer/SDKs/MacOSX10.7.sdk -arch i386 -lgcc" 
./configure

Original comment by DavidLZ...@gmail.com on 6 Jun 2012 at 8:01