UIKit0 / update-engine

Automatically exported from code.google.com/p/update-engine
Apache License 2.0
0 stars 0 forks source link

Build error for GTM Framework #2

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Using latest source (rev 38)
2. Build all or build HelloEngine
3. Link Errors

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

    cd "/Users/philippe/Projects/Open Source/update-engine-read-only"
    /Developer/usr/bin/gcc-4.0 -arch i386 -dynamiclib -isysroot 
/Developer/SDKs/MacOSX10.4u.sdk "-L/Users/philippe/Projects/Open 
Source/update-engine-
read-only/build/Debug" -L/Users/philippe/Projects/Open 
-LSource/update-engine-read-
only/externals/google-toolbox-for-mac/TigerGcov 
"-F/Users/philippe/Projects/Open 
Source/update-engine-read-only/build/Debug" -filelist 
"/Users/philippe/Projects/Open 
Source/update-engine-read-only/build/UpdateEngine.build/Debug/GTM 
Framework.build/Objects-normal/i386/GTM.LinkFileList" -install_name 
/Library/Frameworks/GTM.framework/Versions/A/GTM -mmacosx-version-min=10.4 
-lgcov -
framework Foundation -framework Carbon -Wl,-single_module 
-compatibility_version 1 -
current_version 1 -o "/Users/philippe/Projects/Open Source/update-engine-read-
only/build/UpdateEngine.build/Debug/GTM Framework.build/Objects-normal/i386/GTM"
Undefined symbols:
  "_close$UNIX2003", referenced from:
      ___gcov_open in libgcov.a(_gcov.o)
  "_fcntl$UNIX2003", referenced from:
      ___gcov_open in libgcov.a(_gcov.o)
  "_open$UNIX2003", referenced from:
      ___gcov_open in libgcov.a(_gcov.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
      "_close$UNIX2003", referenced from:
          ___gcov_open in libgcov.a(_gcov.o)
      "_fcntl$UNIX2003", referenced from:
          ___gcov_open in libgcov.a(_gcov.o)
      "_open$UNIX2003", referenced from:
          ___gcov_open in libgcov.a(_gcov.o)
    ld: symbol(s) not found
    collect2: ld returned 1 exit status

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

Xcode 3.1.1 on MacOSX 10.5.5

Please provide any additional information below.

Looks like it's missing a library

Original issue reported on code.google.com by philippe...@gmail.com on 29 Sep 2008 at 11:56

GoogleCodeExporter commented 8 years ago
D'oh. That's an issue caused by the space in the path of your directory 
structure. You're building in a directory 
named "Open Source", and that space is messing up part of your gcc command-line 
arguments (specifically 
one of the "-L" arguments).

I will fix this in UE itself. But until then, here are two work-arounds (just 
do one of them):

1. Rename your "Open Source" directory so that it doesn't have a space
2. Change update-engine/XcodeConfigs/subconfig/CodeCoverage.xcconfig like this:

Index: XcodeConfigs/subconfig/CodeCoverage.xcconfig
===================================================================
--- XcodeConfigs/subconfig/CodeCoverage.xcconfig    (revision 38)
+++ XcodeConfigs/subconfig/CodeCoverage.xcconfig    (working copy)
@@ -16,5 +16,5 @@
 GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES
 GCC_GENERATE_TEST_COVERAGE_FILES = YES
 OTHER_LDFLAGS = $(OTHER_LDFLAGS) -lgcov
-LIBRARY_SEARCH_PATHS = $(LIBRARY_SEARCH_PATHS) 
$(SRCROOT)/externals/google-toolbox-for-
mac/TigerGcov
+LIBRARY_SEARCH_PATHS = $(LIBRARY_SEARCH_PATHS) 
"$(SRCROOT)/externals/google-toolbox-for-
mac/TigerGcov"

(i.e., you just need to quote that one path)

Original comment by dev...@gmail.com on 30 Sep 2008 at 12:10

GoogleCodeExporter commented 8 years ago
Thanks, I added the quotes and now it's building fine.

You would think that in 2008 spaces in a path would not be an issue :-)

Original comment by philippe...@gmail.com on 30 Sep 2008 at 12:21

GoogleCodeExporter commented 8 years ago
"svn up" or checkout the code again and you should get a version w/ the fix. 
Should work now.

Original comment by dev...@gmail.com on 30 Sep 2008 at 12:22