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

cxl/json: Fix tracefs include. #268

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

cxl/json: Fix tracefs include. #268

wants to merge 1 commit into from

Conversation

hramrach
Copy link
Contributor

../cxl/json.c:12:10: fatal error: tracefs/tracefs.h: No such file or directory

pkg-config --cflags libtracefs
-I/usr/include/libtracefs -I/usr/include/traceevent

find /usr/include/ -name tracefs.h
/usr/include/libtracefs/tracefs.h

../cxl/json.c:12:10: fatal error: tracefs/tracefs.h: No such file or
directory

pkg-config --cflags libtracefs
-I/usr/include/libtracefs -I/usr/include/traceevent

find /usr/include/ -name tracefs.h
/usr/include/libtracefs/tracefs.h

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
hswong3i added a commit to alvistack/pmem-ndctl that referenced this pull request Oct 11, 2024
    git clean -xdf
    tar zcvf ../ndctl_80.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp ndctl.spec ../ndctl_80-1.spec
    cp ndctl.rpmlintrc /osc/home\:alvistack/pmem-ndctl-80/
    cp ../ndctl*80*.{gz,xz,spec,dsc} /osc/home\:alvistack/pmem-ndctl-80/
    rm -rf ../*ndctl*80*.* ../*daxctl*80*.* ../*libcxl*80*.*

See pmem#267
See pmem#268

Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
hswong3i added a commit to alvistack/pmem-ndctl that referenced this pull request Oct 11, 2024
    git clean -xdf
    tar zcvf ../ndctl_80.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp ndctl.spec ../ndctl_80-1.spec
    cp ndctl.rpmlintrc /osc/home\:alvistack/pmem-ndctl-80/
    cp ../ndctl*80*.{gz,xz,spec,dsc} /osc/home\:alvistack/pmem-ndctl-80/
    rm -rf ../*ndctl*80*.* ../*daxctl*80*.* ../*libcxl*80*.*

See pmem#267
See pmem#268

Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
@chereskata
Copy link

This fixes the build error on Alpine Linux. It is basically the same issue as here: #234 (v76.1)

@rezso
Copy link

rezso commented Dec 14, 2024

I tried to compile ndctl 80 release with -Dlibtracefs=disabled, but json.c requires tracefs unconditionally, so the build fails.

Copy link

@marc-hb marc-hb left a comment

Choose a reason for hiding this comment

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

This is the same fix as a598663 which is 2 years old now.

Apparently no one complained about #include <tracefs.h> in the other files for 2 years, so this one is a no-brainer.

AlisonSchofield pushed a commit that referenced this pull request Mar 3, 2025
Distros vary on whether tracefs.h is placed in {prefix}/libtracefs/
or {prefix}/tracefs/. Since the library ships with pkgconfig info
to determine the exact include path the #include statement can drop
the tracefs/ prefix.

This was previously found and fixed elsewhere:
a598663 ("cxl/monitor: fix include paths for tracefs and traceevent")
but was introduced anew with cxl media-error support in ndctl v80.

Reposted here from github pull request:
#268

[ alison: commit msg and log edits ]

Fixes: 9873123 ("cxl/list: collect and parse media_error records")
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Marc Herbert <marc.herbert@intel.com>
Link: https://lore.kernel.org/r/20250209180348.1773179-1-alison.schofield@intel.com
Signed-off-by: Alison Schofield <alison.schofield@intel.com>
AlisonSchofield pushed a commit that referenced this pull request Mar 3, 2025
Distros vary on whether tracefs.h is placed in {prefix}/libtracefs/
or {prefix}/tracefs/. Since the library ships with pkgconfig info
to determine the exact include path the #include statement can drop
the tracefs/ prefix.

This was previously found and fixed elsewhere:
a598663 ("cxl/monitor: fix include paths for tracefs and traceevent")
but was introduced anew with cxl media-error support in ndctl v80.

Reposted here from github pull request:
#268

[ alison: commit msg and log edits ]

Fixes: 9873123 ("cxl/list: collect and parse media_error records")
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Marc Herbert <marc.herbert@intel.com>
Link: https://lore.kernel.org/r/20250209180348.1773179-1-alison.schofield@intel.com
Signed-off-by: Alison Schofield <alison.schofield@intel.com>
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.

4 participants