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 build failures about json-c's debug.h #680

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

Conversation

felixonmars
Copy link

open-vm-tools currently fails to build on certain system setup due to conflicting header filename (debug.h). The errors look like:

copyPasteUIX11.h: In member function 'void CopyPasteUIX11::SetBlockControl(DnDBlockControl*)':                                                                                                                                                                                     
copyPasteUIX11.h:90:9: error: 'Debug' was not declared in this scope; did you mean 'g_debug'?                                                                                                                                                                                      
   90 |       { Debug("Setting mBlockCtrl to %p\n", blockCtrl);                                                                                                                                                                                                                    
      |         ^~~~~                                                                                                                                                                                                                                                              
      |         g_debug                                        

This is because when util-linux's configured with cryptsetup support, a dependency chain brings in json-c's include path into GTK_CPPFLAGS and there's /usr/include/json-c/debug.h with the same filename.

gdk-pixbuf-xlib-2.0 -> gdk-pixbuf-2.0 -> gio-2.0 -> mount -> libcryptsetup -> json-c

Preferring our include path over GTK_CPPFLAGS fixes building here.

open-vm-tools currently fails to build on certain system setup due to conflicting header filename (debug.h). The errors look like:

```
copyPasteUIX11.h: In member function 'void CopyPasteUIX11::SetBlockControl(DnDBlockControl*)':                                                                                                                                                                                     
copyPasteUIX11.h:90:9: error: 'Debug' was not declared in this scope; did you mean 'g_debug'?                                                                                                                                                                                      
   90 |       { Debug("Setting mBlockCtrl to %p\n", blockCtrl);                                                                                                                                                                                                                    
      |         ^~~~~                                                                                                                                                                                                                                                              
      |         g_debug                                        
```

This is because when util-linux's configured with cryptsetup support, a dependency chain brings in json-c's include path into GTK_CPPFLAGS and there's `/usr/include/json-c/debug.h` with the same filename.

```
gdk-pixbuf-xlib-2.0 -> gdk-pixbuf-2.0 -> gio-2.0 -> mount -> libcryptsetup -> json-c
```

Preferring our include path over GTK_CPPFLAGS fixes building here.
@vmwclabot
Copy link
Member

@felixonmars, you must sign our contributor license agreement before your changes are merged. Click here to sign the agreement. If you are a VMware employee, read this for further instruction.

@vmwclabot
Copy link
Member

@felixonmars, we have received your signed contributor license agreement. The review is usually completed within a week, but may take longer under certain circumstances. Another comment will be added to the pull request to notify you when the merge can proceed.

@vmwclabot
Copy link
Member

@felixonmars, VMware has approved your signed contributor license agreement.

MingcongBai added a commit to AOSC-Dev/aosc-os-abbs that referenced this pull request Sep 10, 2023
Add a patch from Felix Yan to fix build against a build environment with json-c
installed as a dependency.

Upstream pending.

Ref: vmware/open-vm-tools#680
MingcongBai added a commit to AOSC-Dev/aosc-os-abbs that referenced this pull request Sep 10, 2023
Add a patch from Felix Yan to fix build against a build environment with json-c
installed as a dependency.

Upstream pending.

Ref: vmware/open-vm-tools#680
MingcongBai added a commit to AOSC-Dev/aosc-os-abbs that referenced this pull request Sep 13, 2023
Add a patch from Felix Yan to fix build against a build environment with json-c
installed as a dependency.

Upstream pending.

Ref: vmware/open-vm-tools#680
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.

2 participants