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

Fix Travis & missing build dependency #1627

Merged
merged 14 commits into from
Dec 11, 2018
Merged

Fix Travis & missing build dependency #1627

merged 14 commits into from
Dec 11, 2018

Conversation

liujed
Copy link
Member

@liujed liujed commented Dec 11, 2018

  • Added missing build dependency. The control plane now depends on the front end, so that the parser is built before the P4Runtime serializer. This fixes a heisenbug in the build process.

  • Build now checks for bison>=3.0.2.

  • Don't clobber the user's .bash_profile in install_os_deps.sh.

  • Fix Travis OS X job. Modifying .bash_profile isn't good enough for Travis. Have to set
    environment variables in .travis.yml.

The control plane now depends on the front end, so that the parser is
built before the P4Runtime serializer. This fixes a heisenbug in the
build process.
@liujed liujed requested a review from cc10512 December 11, 2018 00:17
Copy link
Contributor

@mihaibudiu mihaibudiu left a comment

Choose a reason for hiding this comment

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

I hope this works better... Can't tell.

@liujed
Copy link
Member Author

liujed commented Dec 11, 2018

@mbudiu-vmw: I wasn't able to reproduce your build issue until I did a make -j1. This fixes that particular issue for me. I haven't sat through an entire make -j1 build yet, though.

For posterity, here is the error output showing the build dependency between the control plane and the parser:

[  8%] Building CXX object p4c/control-plane/CMakeFiles/controlplane.dir/unified_controlplane_sources_1.cpp.o                                                   
In file included from /data/bf-p4c-compilers/p4c/frontends/parsers/parserDriver.h:25:0,
                 from /data/bf-p4c-compilers/p4c/frontends/p4/parseAnnotations.h:21,
                 from /data/bf-p4c-compilers/p4c/control-plane/p4RuntimeSerializer.cpp:45,
                 from /data/bf-p4c-compilers/build/p4c/control-plane/unified_controlplane_sources_1.cpp:4:
/data/bf-p4c-compilers/p4c/frontends/parsers/p4/abstractP4Lexer.hpp:4:45: fatal error: frontends/parsers/p4/p4parser.hpp: No such file or directory
 #include "frontends/parsers/p4/p4parser.hpp"
                                             ^
compilation terminated.
p4c/control-plane/CMakeFiles/controlplane.dir/build.make:217: recipe for target 'p4c/control-plane/CMakeFiles/controlplane.dir/unified_controlplane_sources_1.cpp.o' failed
make[3]: *** [p4c/control-plane/CMakeFiles/controlplane.dir/unified_controlplane_sources_1.cpp.o] Error 1
CMakeFiles/Makefile2:2331: recipe for target 'p4c/control-plane/CMakeFiles/controlplane.dir/all' failed
make[2]: *** [p4c/control-plane/CMakeFiles/controlplane.dir/all] Error 2
CMakeFiles/Makefile2:1798: recipe for target 'p4c/extensions/bf-p4c/CMakeFiles/p4c-barefoot.dir/rule' failed
make[1]: *** [p4c/extensions/bf-p4c/CMakeFiles/p4c-barefoot.dir/rule] Error 2
Makefile:743: recipe for target 'p4c-barefoot' failed
make: *** [p4c-barefoot] Error 2

@liujed
Copy link
Member Author

liujed commented Dec 11, 2018

Travis job for OS X seems to be running into #83. @cc10512's theory is that this is caused by a recent OS X update.

bison-3.1 is too new for Ubuntu 16.04.
Temporarily abusing this script as a hook to get visibility on what's
going on in Travis.
Modifying `.bash_profile` isn't good enough for Travis. Have to set
environment variables in `.travis.yml`.
@liujed liujed changed the title Added missing build dependency Fix Travis & missing build dependency Dec 11, 2018
@liujed liujed merged commit 93d2bfe into master Dec 11, 2018
@liujed liujed deleted the liujed/fix-build branch December 11, 2018 07:34
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