Fix memtester compilation failure with latest gcc-15#3169
Conversation
| try: | ||
| shutil.copy2(gcc_path, self.gcc_backup_path) | ||
| self.log.info(f"Backed up {gcc_path} to {self.gcc_backup_path}") | ||
|
|
There was a problem hiding this comment.
can you please remove inconsistent blank line across the code
fb9159f to
3a97397
Compare
|
Removed blank lines |
| self.cancel('gcc-13 is required but could not be installed') | ||
| if not os.path.exists(gcc13_path): | ||
| self.cancel('gcc-13 package installed but binary not found at /usr/bin/gcc-13') | ||
| gcc_path = '/usr/bin/gcc' |
There was a problem hiding this comment.
I think this is just a sym-link
| gcc_path = '/usr/bin/gcc' | ||
| self.gcc_backup_path = '/usr/bin/gcc.backup.memtester' | ||
| try: | ||
| shutil.copy2(gcc_path, self.gcc_backup_path) |
There was a problem hiding this comment.
instead of copy, can't we point gcc to gcc-13 using ln ?
| for pkg in ['gcc', 'make']: | ||
| if not smm.check_installed(pkg) and not smm.install(pkg): | ||
| self.cancel('%s is needed for the test to be run' % pkg) | ||
| self.gcc_backup_path = None |
There was a problem hiding this comment.
IS this problem across releases? If not can we restrict this code block for a specific affected release?
0150e75 to
653b00a
Compare
|
Added patch to fix compilation issues with latest gcc15. Test runs fine even with older gcc. |
|
/usr/local/lib/python3.13/site-packages/avocado/core/init.py:18: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81. |
| char *name; | ||
| - int (*fp)(); | ||
| + int (*fp)(ulv *bufa, ulv *bufb, size_t count); | ||
| }; |
There was a problem hiding this comment.
I assume the latest memtester source contains code that uses updated function signatures.
There was a problem hiding this comment.
Hi Sachin
yes, while calling the functions arguments are passed but during declaration arguments were not explicitly declared.
| process.run(memtester_patch, shell=True) | ||
| self.log.info("Applied memtester patch to fix GCC 15+ compilation issues") | ||
| except Exception as e: | ||
| self.log.warning(f"Failed to apply memtester patch: {e}") |
There was a problem hiding this comment.
Is warning sufficient? If the patching fails, compilation of code with gcc-15 will fail. Should this be marked as failed or cancel out if gcc-15 is detected?
memtester testsuite compilation is failing on latest distros with gcc-15, modified code to apply patch to fix this compilation issue. Signed-off-by: Pavithra <pavrampu@linux.ibm.com>
653b00a to
0fc314e
Compare
|
Addressed review comments. |
memtester testsuite compilation is failing on latest distros with gcc-15, modified code to use gcc-13 for memtester if default gcc version is 15 or higher and revert it back.