All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [Bug 12391] New: CMake-based host package fails to include output/host/include
@ 2019-12-09 22:04 bugzilla at busybox.net
  2020-05-19 21:26 ` [Buildroot] [Bug 12391] " bugzilla at busybox.net
  2020-05-20 13:47 ` bugzilla at busybox.net
  0 siblings, 2 replies; 3+ messages in thread
From: bugzilla at busybox.net @ 2019-12-09 22:04 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=12391

            Bug ID: 12391
           Summary: CMake-based host package fails to include
                    output/host/include
           Product: buildroot
           Version: 2019.08.1
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Other
          Assignee: unassigned at buildroot.uclibc.org
          Reporter: thirtythreeforty at gmail.com
                CC: buildroot at uclibc.org
  Target Milestone: ---

Created attachment 8311
  --> https://bugs.busybox.net/attachment.cgi?id=8311&action=edit
Work-in-progress package to replicate the issue

I am struggling to package a new version of mfgtools.  My work-in-progress is
attached; ideally you can extract this into your working directory and
replicate my error.

mfgtools depends on bzlib.h while building.  The compiler (/usr/bin/gcc) cannot
find the bzlib.h file, which at first doesn't make sense... it's in
output/host/include where bzip2 puts it.

/home/ghilliard/Code/buildroot/output/build/host-mfgtools-1.3.102/libuuu/buffer.cpp:43:10:
fatal error: bzlib.h: No such file or directory
 #include "bzlib.h"
          ^~~~~~~~~

The problem is that even though Buildroot passes
-Imy/buildroot/output/host/include into CMake, CMake detects this as an
"implicit include directory" because GCC reports it as such (I think GCC
notices that it has "system" include files, but honestly I am not exactly sure
about its logic).  Then, when the compiler is actually called, this include is
omitted by CMake. Without the include, the compiler doesn't implicitly include
the directory at all, and the build fails.

This hasn't been hit before because there are no bzip2-dependant host packages
in the tree that are built with CMake.  I do not think this is specific to
mfgtools; rather, it will be hit by the first package that does all of the
following:

- Be a host package
- Use CMake to build
- Include a file in output/host/include, not one of its subdirectories

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [Bug 12391] CMake-based host package fails to include output/host/include
  2019-12-09 22:04 [Buildroot] [Bug 12391] New: CMake-based host package fails to include output/host/include bugzilla at busybox.net
@ 2020-05-19 21:26 ` bugzilla at busybox.net
  2020-05-20 13:47 ` bugzilla at busybox.net
  1 sibling, 0 replies; 3+ messages in thread
From: bugzilla at busybox.net @ 2020-05-19 21:26 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=12391

Thomas Petazzoni <thomas.petazzoni@bootlin.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #1 from Thomas Petazzoni <thomas.petazzoni@bootlin.com> ---
Thanks for your bug report.

However, it is really the mfgtools code that is broken: in
libuuu/CMakeLists.txt it overwrites CMAKE_CXX_FLAGS, which means it ignores the
value Buildroot is passing, which contains -I$(HOST_DIR)/include.

If you change:

libuuu/CMakeLists.txt:set(CMAKE_CXX_FLAGS "-O2 ${UUUSSL}")

to:

libuuu/CMakeLists.txt:set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 ${UUUSSL}")

suddenly, it will work.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [Bug 12391] CMake-based host package fails to include output/host/include
  2019-12-09 22:04 [Buildroot] [Bug 12391] New: CMake-based host package fails to include output/host/include bugzilla at busybox.net
  2020-05-19 21:26 ` [Buildroot] [Bug 12391] " bugzilla at busybox.net
@ 2020-05-20 13:47 ` bugzilla at busybox.net
  1 sibling, 0 replies; 3+ messages in thread
From: bugzilla at busybox.net @ 2020-05-20 13:47 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=12391

--- Comment #2 from Fabrice Fontaine <fontaine.fabrice@gmail.com> ---
FYI, I sent the fix suggested by Thomas and it was merged upstream:
https://github.com/NXPmicro/mfgtools/commit/ea8eb862ce2445c17bb8dd55587d6a2581d20b68

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-05-20 13:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-09 22:04 [Buildroot] [Bug 12391] New: CMake-based host package fails to include output/host/include bugzilla at busybox.net
2020-05-19 21:26 ` [Buildroot] [Bug 12391] " bugzilla at busybox.net
2020-05-20 13:47 ` bugzilla at busybox.net

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.