Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add glibc binary #70

Closed

Conversation

cosmicexplorer
Copy link
Contributor

@cosmicexplorer cosmicexplorer commented Jun 8, 2018

See pantsbuild/pants#5943. We are providing the glibc binary (55 MB tar.gz file), which we build from source. We provide version 2.27, the newest version. The script works on my machine and the archive produced works with the GLibc BinaryTool from pantsbuild/pants#5943 on my machine as well (the unskipped tests pass).

Copy link
Member

@stuhood stuhood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not appear to build out of the box on our centos6 image, due to a requirement on bison 2.7 (centos6 has bison 2.4). That image is using devtoolset-7-gcc, but it doesn't appear to include bison.

@cosmicexplorer
Copy link
Contributor Author

cosmicexplorer commented Jun 11, 2018

I should have checked that before making this pr! I will see if it's reasonable to build or download bison 2.7 as part of the build process for the glibc package.

@stuhood
Copy link
Member

stuhood commented Jun 11, 2018

Let me know when this is reviewable again.

@cosmicexplorer
Copy link
Contributor Author

@stuhood after fd2f10c, this should be reviewable -- it builds on my exact-same-docker-image. Once bison was built, we also needed to install the m4 package, and downgrade the glibc version to 2.23. I will update this in pantsbuild/pants#5943.

cosmicexplorer added a commit to cosmicexplorer/pants that referenced this pull request Jun 11, 2018
@cosmicexplorer
Copy link
Contributor Author

That's wrong! There's a later build failure. Sorry, will be 100% sure next time.

@stuhood
Copy link
Member

stuhood commented Jun 11, 2018

Can you confirm that the downgraded glibc actually needs the newer bison? It looks sufficiently old to maybe work in the centos image.

EDIT: I confirmed that it still needs bison 2.7. But the INSTALL note indicates:

If you wish to regenerate the 'yacc' parser code in the 'intl'
subdirectory you will need

   * GNU 'bison' 2.7 or later

...so perhaps it's possible to skip that step in the configure script.

@cosmicexplorer
Copy link
Contributor Author

perhaps it's possible to skip that step in the configure script.

I believe it is, I had seen that in the release notes but did not think more of it. Will implement that now.

@cosmicexplorer
Copy link
Contributor Author

@stuhood I have not been able to get this to build in a finite amount of time in my centos6 image. Setting -j2 causes errors that seem to be due to parallelism, so I've set it to build in serial, which obviously doesn't help. I would appreciate it if you could try running the script here, but just let me know if it fails and I will investigate -- it seems like it might be a faster path to getting this done than waiting another day for my laptop to get around to it.

cosmicexplorer added a commit to cosmicexplorer/pants that referenced this pull request Jun 13, 2018
@stuhood
Copy link
Member

stuhood commented Jun 13, 2018

I have this (post 10d1827) running in the background.

@stuhood
Copy link
Member

stuhood commented Jun 13, 2018

It failed with:

<snip>
make[2]: Leaving directory `/pantsbuild-binaries/build-support/bin/glibc/linux/x86_64/2.23/glibc-2.23-linux/glibc-2.23/libio'
make  subdir=dlfcn -C dlfcn ..=../ subdir_lib
make[2]: Entering directory `/pantsbuild-binaries/build-support/bin/glibc/linux/x86_64/2.23/glibc-2.23-linux/glibc-2.23/dlfcn'
.././scripts/mkinstalldirs /pantsbuild-binaries/build-support/bin/glibc/linux/x86_64/2.23/glibc-2.23-linux/glibc-build/dlfcn
mkdir -p -- /pantsbuild-binaries/build-support/bin/glibc/linux/x86_64/2.23/glibc-2.23-linux/glibc-build/dlfcn
.././scripts/mkinstalldirs /pantsbuild-binaries/build-support/bin/glibc/linux/x86_64/2.23/glibc-2.23-linux/glibc-build/dlfcn
.././scripts/mkinstalldirs /pantsbuild-binaries/build-support/bin/glibc/linux/x86_64/2.23/glibc-2.23-linux/glibc-build/dlfcn
echo '' > /pantsbuild-binaries/build-support/bin/glibc/linux/x86_64/2.23/glibc-2.23-linux/glibc-build/dlfcn/stamp.osT
echo '' > /pantsbuild-binaries/build-support/bin/glibc/linux/x86_64/2.23/glibc-2.23-linux/glibc-build/dlfcn/stamp.oST
mv -f /pantsbuild-binaries/build-support/bin/glibc/linux/x86_64/2.23/glibc-2.23-linux/glibc-build/dlfcn/stamp.osT /pantsbuild-binaries/build-support/bin/glibc/linux/x86_64/2.23/glibc-2.23-linux/glibc-build/dlfcn/stamp.os
gcc sdlopen.c -c -std=gnu11 -fgnu89-inline  -O2 -Wall -Wundef -Wwrite-strings -fmerge-all-constants -frounding-math -g -Wstrict-prototypes -Wold-style-definition     -ftls-model=initial-exec      -I../include -I/pantsbuild-binaries/build-support/bin/glibc/linux/x86_64/2.23/glibc-2.23-linux/glibc-build/dlfcn  -I/pantsbuild-binaries/build-support/bin/glibc/linux/x86_64/2.23/glibc-2.23-linux/glibc-build  -I../sysdeps/unix/sysv/linux/x86_64/64  -I../sysdeps/unix/sysv/linux/x86_64  -I../sysdeps/unix/sysv/linux/x86  -I../sysdeps/unix/sysv/linux/wordsize-64  -I../sysdeps/x86_64/nptl  -I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux  -I../sysdeps/nptl  -I../sysdeps/pthread  -I../sysdeps/gnu  -I../sysdeps/unix/inet  -I../sysdeps/unix/sysv  -I../sysdeps/unix/x86_64  -I../sysdeps/unix  -I../sysdeps/posix  -I../sysdeps/x86_64/64  -I../sysdeps/x86_64/fpu/multiarch  -I../sysdeps/x86_64/fpu  -I../sysdeps/x86/fpu/include -I../sysdeps/x86/fpu  -I../sysdeps/x86_64/multiarch  -I../sysdeps/x86_64  -I../sysdeps/x86  -I../sysdeps/ieee754/ldbl-96  -I../sysdeps/ieee754/dbl-64/wordsize-64  -I../sysdeps/ieee754/dbl-64  -I../sysdeps/ieee754/flt-32  -I../sysdeps/wordsize-64  -I../sysdeps/ieee754  -I../sysdeps/generic  -I.. -I../libio -I.   -D_LIBC_REENTRANT -include /pantsbuild-binaries/build-support/bin/glibc/linux/x86_64/2.23/glibc-2.23-linux/glibc-build/libc-modules.h -DMODULE_NAME=libc -include ../include/libc-symbols.h       -o /pantsbuild-binaries/build-support/bin/glibc/linux/x86_64/2.23/glibc-2.23-linux/glibc-build/dlfcn/sdlopen.o -MD -MP -MF /pantsbuild-binaries/build-support/bin/glibc/linux/x86_64/2.23/glibc-2.23-linux/glibc-build/dlfcn/sdlopen.o.dt -MT /pantsbuild-binaries/build-support/bin/glibc/linux/x86_64/2.23/glibc-2.23-linux/glibc-build/dlfcn/sdlopen.o
mv -f /pantsbuild-binaries/build-support/bin/glibc/linux/x86_64/2.23/glibc-2.23-linux/glibc-build/dlfcn/stamp.oST /pantsbuild-binaries/build-support/bin/glibc/linux/x86_64/2.23/glibc-2.23-linux/glibc-build/dlfcn/stamp.oS
mv: cannot stat `/pantsbuild-binaries/build-support/bin/glibc/linux/x86_64/2.23/glibc-2.23-linux/glibc-build/dlfcn/stamp.oST': No such file or directory
make[2]: *** [/pantsbuild-binaries/build-support/bin/glibc/linux/x86_64/2.23/glibc-2.23-linux/glibc-build/dlfcn/stamp.oS] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/pantsbuild-binaries/build-support/bin/glibc/linux/x86_64/2.23/glibc-2.23-linux/glibc-2.23/dlfcn'
make[1]: *** [dlfcn/subdir_lib] Error 2
make[1]: Leaving directory `/pantsbuild-binaries/build-support/bin/glibc/linux/x86_64/2.23/glibc-2.23-linux/glibc-2.23'
make: *** [all] Error 2
cp: cannot stat `': No such file or directory

@cosmicexplorer
Copy link
Contributor Author

Ok, that was the exact error that the serial make had fixed. I didn't see it repro when I tested it, so I tried adding parallelism again, but I guess that's the thing about concurrency errors. I have reverted that commit and it should work -- if you run into a new issue I will investigate. Thanks for your patience.

@stuhood
Copy link
Member

stuhood commented Jun 13, 2018

...hm. That previous failure was likely because my machine is out of disk space.

@cosmicexplorer
Copy link
Contributor Author

cosmicexplorer commented Jun 13, 2018 via email

@cosmicexplorer
Copy link
Contributor Author

See discussion in pantsbuild/pants#5943 -- we shouldn't be providing glibc, and we will instead be searching for it on the host, or erroring out.

cosmicexplorer added a commit to cosmicexplorer/pants that referenced this pull request Jun 23, 2018
cosmicexplorer added a commit to cosmicexplorer/pants that referenced this pull request Jun 27, 2018
cosmicexplorer added a commit to cosmicexplorer/pants that referenced this pull request Jun 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants