bpd1069 / naclports

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

glibc-compat does not build on Pepper 39 #160

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install the pepper_39 NaCl SDK.
2. Set NACL_SDK_ROOT to the pepper_39 directory.
3. From naclports, run 'make glibc-compat'.

What is the expected output? What do you see instead?
Compile failure:
bin/naclports install glibc-compat 
Building 'glibc-compat' [x86_64/newlib/release]
Patching existing specs file
chdir /path/to/naclports/src/out/build/glibc-compat/glibc-compat-0.1
######################################################################
Configuring glibc-compat
######################################################################
chdir /path/to/naclports/src/out/build/glibc-compat/glibc-compat-0.1
cp -rf /path/to/naclports/src/ports/glibc-compat/build.sh 
/path/to/naclports/src/ports/glibc-compat/include 
/path/to/naclports/src/ports/glibc-compat/Makefile 
/path/to/naclports/src/ports/glibc-compat/pkg_info 
/path/to/naclports/src/ports/glibc-compat/README 
/path/to/naclports/src/ports/glibc-compat/src .
rm -rf out
######################################################################
Building glibc-compat
######################################################################
chdir /path/to/naclports/src/out/build/glibc-compat/glibc-compat-0.1
make -j32
make[1]: Entering directory 
`/path/to/naclports/src/out/build/glibc-compat/glibc-compat-0.1'
 CC out/getprotobyname_r.o
 CC out/getservbyname_r.o
 CC out/herrno.o
 CC out/herror.o
 CC out/in6_addr.o
 CC out/inet_addr.o
 CC out/inet_pton.o
 CC out/ns_netint.o
 CC out/ns_name.o
 CC out/ns_samedomain.o
 CC out/qsort_r.o
 CC out/random.o
 CC out/realpath.o
 CC out/res_comp.o
 CC out/res_data.o
 CC out/res_debug.o
 CC out/res_init.o
 CC out/res_libc.o
 CC out/res_mkquery.o
 CC out/res_query.o
 CC out/res_send.o
 CC out/stubs.o
In file included from src/res_send.c:93:
include/fcntl.h:11:1: error: "FIONBIO" redefined
In file included from src/res_send.c:90:
include/sys/ioctl.h:83:1: error: this is the location of the previous definition
make[1]: *** [out/res_send.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory 
`/path/to/naclports/src/out/build/glibc-compat/glibc-compat-0.1'
naclports: Building 'glibc-compat' failed.
make: *** [glibc-compat] Error 1

What version of the product are you using? On what operating system?
Pepper version: 39.
naclports version: 4eee512 (2014-11-09).
OS: Ubuntu 14.04.

Note: This library seems to be required by SDL, as of 33d366f (2014-10-15). 
Before that revision, SDL compiles successfully (but glib-compat still fails 
with the same error).

Does not fail against pepper_38 SDK.

I have no idea where include/fcntl.h comes from... it is in an out directory 
and I can't find its source code in naclports or anywhere in the Chromium / 
NaCl repositories.

Original issue reported on code.google.com by mgiuca@chromium.org on 10 Nov 2014 at 6:41

GoogleCodeExporter commented 9 years ago
I can't seem to reproduce this:

$ export NACL_SDK_ROOT=$HOME/nacl_sdk/pepper_39
$ ./make_all.sh clean
$ make glibc-compat V=1

Works fine for me at 4eee51203.

Original comment by sbc@chromium.org on 10 Nov 2014 at 5:37

GoogleCodeExporter commented 9 years ago
The file in question "include/fcntl.h" is found in source control at 
"ports/glibc-compat/include/sys/fcntl.h".  This file does not contain FIONBIO 
at 4eee512.  It looks like it was removed at e08c19df (on sept 11 2014) so I 
suspect you have a some kind of stale checkout?

Original comment by sbc@google.com on 10 Nov 2014 at 5:41

GoogleCodeExporter commented 9 years ago
BTW, I'm about to create branches for pepper_38, pepper_39 and pepper_40 in the 
naclports repo that we can use to avoid breaking older SDK as we make change 
(which are mostly tested against pepper_canary).

Original comment by sbc@google.com on 10 Nov 2014 at 5:42

GoogleCodeExporter commented 9 years ago
Running make with V=1 shows this additional line:

Prebuilt package was built with different SDK version: 38 vs 39

Running ./make_all.sh clean and then make fixes the problem.

So I guess there was some stale state around. It certainly wasn't a stale 
checkout of anything, but a stale build (which means the Makefile isn't smart 
enough about deciding what needs to be rebuilt).

Original comment by mgiuca@chromium.org on 10 Nov 2014 at 11:04

GoogleCodeExporter commented 9 years ago
I don't really understand how you could have got this error:

include/fcntl.h:11:1: error: "FIONBIO" redefined

Unless you have a file called ports/glibc-compat/include/fcntl.h.  Yes this file
was removed here:

https://codereview.chromium.org/418103005

If the fcntl.h was installed in the toolchain it would aprear as a full path 
name.

Sorry I don't have any other clues here.

Please re-open if it happens again.

Original comment by sbc@google.com on 10 Nov 2014 at 11:15

GoogleCodeExporter commented 9 years ago
Yeah I think what happened was I had ports/glibc-compat/include/fcntl.h left 
over from an old build (pre-pepper-38). Then when I re-ran make 
(post-pepper-39), it was not deleted and something was still referring to it.

Now it is working.

Original comment by mgiuca@chromium.org on 11 Nov 2014 at 12:53