humanai / gyp

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

Make generator fails when target is explicitly specified #67

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The test/hello/gyptest-target.py test script fails under the Make 
generator.  This test generates a simple "Hello, world" configuration which 
works fine for simply typing "make" (tested by test/hello/gyptest-
default.py) or "make all" (tested by test/hello/gyptest-all.py).  The same 
configuration fails when an explicit "make hello" is specified, output 
below.

I haven't investigated yet to determine if the problem is in the generator 
itself or if the test script+infrastructure need to accommodate Make 
differently.

$ python gyptest.py -f make test/hello/gyptest-target.py
PYTHONPATH=/home/knight/src/gyp/trunk/test/lib
TESTGYP_FORMAT=make
/usr/bin/python test/hello/gyptest-target.py
None returned 2
STDOUT 
=========================================================================
  CC out/Default/obj/hello.o
  LINK out/Default/obj/hello
  COPY out/Default/hello
cc     hello.c out/Default/hello   -o hello

STDERR 
=========================================================================
out/Default/hello: In function `_start':
(.text+0x0): multiple definition of `_start'
/usr/lib/gcc/x86_64-linux-gnu/4.2.4/../../../../lib/crt1.o:(.text+0x0): 
first defined here
out/Default/hello: In function `_fini':
/build/buildd/glibc-2.7/build-tree/amd64-libc/csu/crti.S:37: multiple 
definition of `_fini'
/usr/lib/gcc/x86_64-linux-
gnu/4.2.4/../../../../lib/crti.o:/build/buildd/glibc-2.7/build-tree/amd64-
libc/csu/crti.S:37: first defined here
out/Default/hello:(.rodata+0x0): multiple definition of `_IO_stdin_used'
/usr/lib/gcc/x86_64-linux-
gnu/4.2.4/../../../../lib/crt1.o:(.rodata.cst4+0x0): first defined here
out/Default/hello: In function `__data_start':
(.data+0x0): multiple definition of `__data_start'
/usr/lib/gcc/x86_64-linux-gnu/4.2.4/../../../../lib/crt1.o:(.data+0x0): 
first defined here
out/Default/hello: In function `__data_start':
(.data+0x8): multiple definition of `__dso_handle'
/usr/lib/gcc/x86_64-linux-gnu/4.2.4/crtbegin.o:(.data+0x0): first defined 
here
out/Default/hello: In function `main':
(.text+0xb8): multiple definition of `main'
/tmp/ccKiEybO.o:hello.c:(.text+0x0): first defined here
out/Default/hello: In function `_init':
/build/buildd/glibc-2.7/build-tree/amd64-libc/csu/crti.S:25: multiple 
definition of `_init'
/usr/lib/gcc/x86_64-linux-
gnu/4.2.4/../../../../lib/crti.o:/build/buildd/glibc-2.7/build-tree/amd64-
libc/csu/crti.S:25: first defined here
/usr/bin/ld: error in out/Default/hello(.eh_frame); no .eh_frame_hdr table 
will be created.
collect2: ld returned 1 exit status
make: *** [hello] Error 1

FAILED test at line 411 of 
/home/knight/src/gyp/trunk/test/lib/TestCommon.py (_complete)
    from line 528 of /home/knight/src/gyp/trunk/test/lib/TestCommon.py 
(run)
    from line 139 of /home/knight/src/gyp/trunk/test/lib/TestGyp.py 
(run)
    from line 224 of /home/knight/src/gyp/trunk/test/lib/TestGyp.py 
(run_build)
    from line 216 of /home/knight/src/gyp/trunk/test/lib/TestGyp.py 
(build_target)
    from line 14 of test/hello/gyptest-target.py

Failed the following test:
    test/hello/gyptest-target.py

Original issue reported on code.google.com by sgk@chromium.org on 19 Aug 2009 at 5:19

GoogleCodeExporter commented 9 years ago
working on this

Original comment by mattm@chromium.org on 2 Sep 2009 at 7:50

GoogleCodeExporter commented 9 years ago

Original comment by evan@chromium.org on 2 Sep 2009 at 8:25