make -j1 failed with the same error.
I was able to run configure successfully without issues.

I'll try to add the lib path and see...
*gcc -Xlinker -v*

tyao@Goden-Yao-MacBook-Pro-3  ~/source/asf/incubator-hawq  
2.0.0-incubating  gcc -Xlinker -v
@(#)PROGRAM:ld  PROJECT:ld64-264.3.102
configured to support archs: armv6 armv7 armv7s arm64 i386 x86_64
x86_64h armv6m armv7k armv7m armv7em (tvOS)
Library search paths:
    
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/lib
Framework search paths:
    
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/
Undefined symbols for architecture x86_64:
  "_main", referenced from:
     implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

​

On Sun, Jun 26, 2016 at 11:02 PM Guo Gang <[email protected]> wrote:

> That means that gcc fails to find the linking library path for json-c. It
> is a bit weird since
> during configure, "-ljson-c" was earlier sanity-checked.
>
> Are you able to run configure successfully now?
>
> Is /usr/local/lib in your gcc default library search paths?
> # gcc -Xlinker -v
>
> A simple workaround is:
> during configure, add /usr/local/lib as an addition lib path
>   --with-libraries=DIRS   look for additional libraries in DIRS
> or you could add the path to env variable LIBRARY_PATH
>
>
> 2016-06-25 8:54 GMT+08:00 hong wu <[email protected]>:
>
> > Hi goden,
> >
> > I have just try building 2.0.0-incubating branch under my Mac OS EI
> Capitan
> > and it works.
> >
> > I need some more information to ensure the problem for you:
> > 1. Could you build again using make -j1 and paste the earliest occurred
> > error?(to ensure the exact problem)
> > 2. Could you build master branch successfully?(to ensure whether it is
> the
> > problem of this branch)
> > 3. Could you paste the configuration information here? Also, you could
> > check your linking option `-ljson-c` by writing a simple C Json program.
> >
> > Best
> > xunzhang
> >
> > 2016-06-25 6:37 GMT+08:00 Goden Yao <[email protected]>:
> >
> > > I was trying to build from 2.0.0-incubating branch before I start
> > releasing
> > > process.
> > > I followed wiki page for Open source build steps.
> > > Got this error:
> > > But I’ve installed json-c with —universal and I’m on Mac OS El Capitan
> > >
> > > Error
> > >
> > > gcc -O3 -std=gnu99  -Wall -Wmissing-prototypes -Wpointer-arith
> > > -Wendif-labels -Wformat-security -fno-strict-aliasing -fwrapv
> > >
> > >
> >
> -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/libxml2
> > > -O1 zic.o ialloc.o scheck.o localtime.o -L../../src/port
> > > -L../../src/port -Wl,-dead_strip_dylibs
> > >
> > >
> >
> -L/Users/tyao/source/asf/incubator-hawq/depends/libhdfs3/build/install/Users/tyao/hawq/2.0.0-incubating/lib
> > >
> > >
> >
> -L/Users/tyao/source/asf/incubator-hawq/depends/libyarn/build/install/Users/tyao/hawq/2.0.0-incubating/lib
> > >   -lpgport -ljson-c -levent -lyaml -lsnappy -lbz2 -lz -ledit -lm
> > > -lcurl -lyarn -lkrb5 -o zic*ld: library not found for -ljson-c
> > > *clang: error: linker command failed with exit code 1 (use -v to see
> > > invocation)
> > > make[2]: *** [zic] Error 1
> > > make[1]: *** [all] Error 2
> > >
> > > Symlinks:
> > >
> > > lrwxr-xr-x  1 tyao  admin    43B Jun 24 14:26
> > > /usr/local/lib/libjson-c.2.dylib ->
> > > ../Cellar/json-c/0.12/lib/libjson-c.2.dylib
> > > lrwxr-xr-x  1 tyao  admin    37B Jun 24 14:26
> > > /usr/local/lib/libjson-c.a -> ../Cellar/json-c/0.12/lib/libjson-c.a
> > > lrwxr-xr-x  1 tyao  admin    41B Jun 24 14:26
> > > /usr/local/lib/libjson-c.dylib ->
> > > ../Cellar/json-c/0.12/lib/libjson-c.dylib
> > >
> > > ​
> > >
> >
>

Reply via email to