Skip to content

Enable 24.04 CI build.#26

Merged
fruffy merged 7 commits intomainfrom
fruffy/ubuntu24_04
Feb 26, 2026
Merged

Enable 24.04 CI build.#26
fruffy merged 7 commits intomainfrom
fruffy/ubuntu24_04

Conversation

@fruffy
Copy link
Contributor

@fruffy fruffy commented Jan 17, 2025

No description provided.

@jafingerhut
Copy link
Contributor

I have no idea how this could possibly be passing, given Ubuntu 24.04 has the version of pip that gives an error if you run it as root and try to install packages system-wide.

Unless something in the install scripts is setting the special environment variable that masks that error?

@fruffy
Copy link
Contributor Author

fruffy commented Jan 17, 2025

Unless something in the install scripts is setting the special environment variable that masks that error?

p4studio installs python packages locally in the install folder, this is why pip doesn't complain.

@fruffy fruffy marked this pull request as ready for review January 17, 2025 13:16
@fruffy fruffy requested a review from jafingerhut January 17, 2025 13:16
@fruffy fruffy marked this pull request as draft January 20, 2025 01:56
@fruffy fruffy force-pushed the fruffy/ubuntu24_04 branch from 567017a to d54dc34 Compare April 2, 2025 15:34
@fruffy fruffy force-pushed the fruffy/ubuntu24_04 branch from d54dc34 to 0e01e27 Compare February 22, 2026 19:48
@fruffy fruffy marked this pull request as ready for review February 22, 2026 21:23
@fruffy fruffy force-pushed the fruffy/ubuntu24_04 branch from 20287ab to 408a9ee Compare February 22, 2026 23:19
@fruffy
Copy link
Contributor Author

fruffy commented Feb 23, 2026

@jafingerhut This finally allows us to build Ubuntu 24.04, GPT 5.3 was a great help.

@jafingerhut
Copy link
Contributor

If @grg or @ChrisDodd are interested in giving this a look, that would be great. Understood if they would prefer not to, also. Maybe give one of them until Feb 25 or so to take a look and comment, and I'll approve then.

I guess most of the C++ code changes are due to needing to support a newer version of GCC?

@fruffy
Copy link
Contributor Author

fruffy commented Feb 23, 2026

I guess most of the C++ code changes are due to needing to support a newer version of GCC?

Yes, also rapidjson and fmt are quite out of date. The logging fixes are mostly guesses.

@grg
Copy link

grg commented Feb 23, 2026

I'll try to take a look in the next few days. Sorry for missing this earlier.

@fruffy fruffy force-pushed the fruffy/ubuntu24_04 branch from 7223262 to 0bf8121 Compare February 24, 2026 01:19
Copy link

@ChrisDodd ChrisDodd left a comment

Choose a reason for hiding this comment

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

I don't see anything that looks wrong, but I'm not very knowledgeable about CMAKE or the details of how to make subtle things work. The C++ changes are all fine, though.

Signed-off-by: fruffy <fruffy@nyu.edu>
Signed-off-by: fruffy <fruffy@nyu.edu>
Signed-off-by: fruffy <fruffy@nyu.edu>
Signed-off-by: fruffy <fruffy@nyu.edu>
Signed-off-by: fruffy <fruffy@nyu.edu>
Signed-off-by: fruffy <fruffy@nyu.edu>
Signed-off-by: fruffy <fruffy@nyu.edu>
@fruffy fruffy force-pushed the fruffy/ubuntu24_04 branch from 0bf8121 to 3155668 Compare February 24, 2026 03:06
Copy link

@grg grg left a comment

Choose a reason for hiding this comment

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

Looks okay. My comments are all questions -- only one of which needs confirmation before merging.

Comment on lines +13 to +15
-DSRC_BUILD=${CMAKE_CURRENT_BINARY_DIR}/bf_kdrv.ko
-DSRC_SOURCE=${CMAKE_CURRENT_SOURCE_DIR}/bf_kdrv.ko
-DDST=${DRIVER_FILE}
Copy link

Choose a reason for hiding this comment

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

SRC_BUILD and DST both end up pointing to the same file. Is this intentional? (I believe it is, but just want to confirm. The copy script will skip the copy if it falls back to using SRC_BUILD since the ONLY_IF_DIFFERENT flag is passed to the file(COPY_FILE ...) command.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, initially I tried to have a separate build, but ended up running into a bunch of issues. Ultimately, I ended up handing this to GPT 5.3... This build works for me and handles both Ubuntu versions for the time being.

Comment on lines +6 to +7
set(KBUILD_CMD $(MAKE) -C ${KERNELDIR} M=${CMAKE_CURRENT_SOURCE_DIR} MO=${CMAKE_CURRENT_BINARY_DIR} modules)
set(KBUILD_CLEAN $(MAKE) -C ${KERNELDIR} M=${CMAKE_CURRENT_SOURCE_DIR} MO=${CMAKE_CURRENT_BINARY_DIR} clean)
Copy link

Choose a reason for hiding this comment

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

Question (no change desired in this PR): do we have any expectation that this would work if someone uses ninja as their generator instead of make? (i.e., cmake -GNinja ...)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As far as I know, no. I have only seen make used with these modules

}

template <typename T>
std::string stream_to_string(const T &value) {
Copy link

Choose a reason for hiding this comment

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

Why did this function (and all the calls to it) need to be added? Were there some implicit casts that were failing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The fmt version used is quite old, it seems to have problems with newer versions of gcc for some of these constructs that use .str(). I have not had the time to dig deeper why. Updating the vendored fmt might also solve the issue.

Copy link
Contributor

@jafingerhut jafingerhut left a comment

Choose a reason for hiding this comment

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

Approving to unblock merging, based on Glen's review.

@fruffy fruffy merged commit 998078f into main Feb 26, 2026
4 of 5 checks passed
@fruffy fruffy deleted the fruffy/ubuntu24_04 branch February 26, 2026 01:27
jafingerhut pushed a commit to jafingerhut/open-p4studio that referenced this pull request Feb 26, 2026
Signed-off-by: fruffy <fruffy@nyu.edu>
Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu>
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.

Build failed on Ubuntu 24.04 with patch bfa6f48 Compilation error Ubuntu 24.04 support

4 participants