[P4-dev] new p4c compiler

hemant at mnkcg.com hemant at mnkcg.com
Fri Aug 18 16:00:27 EDT 2017


Hi Cole,

 

I am using cmkae 3.5.1.  “cmake ..” worked.   I did try the CMAKE_INSTALL_PREIFX for where cmake is installed on my Ubuntu, but I still failed elsewhere in the optional args.    After “cmake ..”, I invoked the next step in “make -j4” and once it completes, I will get back.  Sorry, I don’t know how to pull a specific p4c version such as what you did with “(commit 9efc595857b18fdf68ba93fb3dc772f5c5dfe6c3)”.   Once, I know, I’d be happy to try this version as well.  I am on the U.S. East coast and downloaded the p4c today morning. 

 

Thanks much for the quick reply.  

 

Cheers,

 

Hemant

 

From: Cole Schlesinger [mailto:cschlesinger at barefootnetworks.com] 
Sent: Friday, August 18, 2017 3:49 PM
To: Mihai Budiu <mbudiu at vmware.com>
Cc: hemant at mnkcg.com; p4-dev <p4-dev at lists.p4.org>
Subject: Re: [P4-dev] new p4c compiler

 

Hi Hemant,

 

Expanding on Mihai’s comment, all the cmake flags listed in the README are optional.  For more information about the CMAKE_INSTALL_PREFIX specifically, see:

https://cmake.org/cmake/help/v2.8.8/cmake.html#variable%3aCMAKE_INSTALL_PREFIX <https://cmake.org/cmake/help/v2.8.8/cmake.html#variable:CMAKE_INSTALL_PREFIX> 

 

But `cmake ..` should work fine.

 

I also wasn’t able to reproduce the cmake error you mentioned.  I used a fresh installation of Ubuntu 16.04 with the current head of p4c/master (commit 9efc595857b18fdf68ba93fb3dc772f5c5dfe6c3).

 

By default, `sudo apt-get install cmake` on Ubuntu 16.04 installs cmake version 3.5.1.  What version are you using?

 

Cheers,

Cole

 

 

 

On Aug 18, 2017, at 12:41 PM, Mihai Budiu <mbudiu at vmware.com <mailto:mbudiu at vmware.com> > wrote:

 

You can probably just run

 

cmake ..

 

Mihai

 

From:  <mailto:hemant at mnkcg.com> hemant at mnkcg.com
Sent: Friday, August 18, 2017 12:15
To:  <mailto:p4-dev at lists.p4.org> 'p4-dev'
Subject: [P4-dev] new p4c compiler

 

I downloaded the p4c compiler today and was shocked to see that its past “configure”, the “build” directory etc. are all gone.  Now the compiler wants the user to create the “build” directory and then invoke the following cmake command. 

 

cmake .. [-DCMAKE_BUILD_TYPE=RELEASE|DEBUG] [-DCMAKE_INSTALL_PREFIX=<path>] [-DENABLE_DOCS=ON (default off)] [-DENABLE_P4RUNTIME_TO_PD=OFF (default on)]

 

What is CMAKE_INSTALL_PREFIX so that one can figure out what path to provide?  Is the path where cmake is installed?  Further, the cmake on my Ubuntu 16.04 fails with “bash: syntax error near unexpected token ‘(‘.  

 

At least, an example of cmake with a “<path>”  should be included in the README so that folks can get an idea.  

 

This version of the compiler is really not usable.   Please help.

 

Hemant

_______________________________________________
P4-dev mailing list
P4-dev at lists.p4.org <mailto:P4-dev at lists.p4.org> 
http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20170818/a5ea1e09/attachment-0002.html>


More information about the P4-dev mailing list