public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/95005] New: zstd.h not found if installed in non-system prefix
@ 2020-05-08 10:42 gcc at ikkoku dot de
  2020-05-09  7:06 ` [Bug bootstrap/95005] " marxin at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: gcc at ikkoku dot de @ 2020-05-08 10:42 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95005

            Bug ID: 95005
           Summary: zstd.h not found if installed in non-system prefix
           Product: gcc
           Version: 10.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gcc at ikkoku dot de
  Target Milestone: ---

Created attachment 48482
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48482&action=edit
Add zstd include directory

While adding GCC 10.1.0 to Spack, I ran into a problem with zstd: When
specifying a non-system prefix with --with-zstd (Spack installs each package in
its own prefix), the build of lto-compress.o failed because it could not find
the zstd.h header.

The attached patch fixes the problem. It should probably be changed to export
the appropriate compiler flag from configure.ac to avoid the ifeq in the
Makefile. However, I wanted to avoid touching configure.ac so we do not have to
regenerate configure.

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

* [Bug bootstrap/95005] zstd.h not found if installed in non-system prefix
  2020-05-08 10:42 [Bug other/95005] New: zstd.h not found if installed in non-system prefix gcc at ikkoku dot de
@ 2020-05-09  7:06 ` marxin at gcc dot gnu.org
  2020-05-11  7:18 ` marxin at gcc dot gnu.org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-05-09  7:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95005

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2020-05-09
           Assignee|unassigned at gcc dot gnu.org      |marxin at gcc dot gnu.org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever confirmed|0                           |1

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

* [Bug bootstrap/95005] zstd.h not found if installed in non-system prefix
  2020-05-08 10:42 [Bug other/95005] New: zstd.h not found if installed in non-system prefix gcc at ikkoku dot de
  2020-05-09  7:06 ` [Bug bootstrap/95005] " marxin at gcc dot gnu.org
@ 2020-05-11  7:18 ` marxin at gcc dot gnu.org
  2020-05-11  8:40 ` gcc at ikkoku dot de
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-05-11  7:18 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95005

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Created attachment 48503
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48503&action=edit
Patch candidate

Thank you for the bug report.
I'm sending a better patch, can you please test it?

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

* [Bug bootstrap/95005] zstd.h not found if installed in non-system prefix
  2020-05-08 10:42 [Bug other/95005] New: zstd.h not found if installed in non-system prefix gcc at ikkoku dot de
  2020-05-09  7:06 ` [Bug bootstrap/95005] " marxin at gcc dot gnu.org
  2020-05-11  7:18 ` marxin at gcc dot gnu.org
@ 2020-05-11  8:40 ` gcc at ikkoku dot de
  2020-05-11  9:31 ` marxin at gcc dot gnu.org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: gcc at ikkoku dot de @ 2020-05-11  8:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95005

--- Comment #2 from Michael Kuhn <gcc at ikkoku dot de> ---
(In reply to Martin Liška from comment #1)
> Thank you for the bug report.
> I'm sending a better patch, can you please test it?

I applied your patch on top of the GCC 10.1.0 tarball. Sadly, it still fails
with the same error. It looks like ZSTD_CPPFLAGS is not actually exported/set
anywhere (only available in configure), which is why I made use of
ZSTD_INCLUDE.

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

* [Bug bootstrap/95005] zstd.h not found if installed in non-system prefix
  2020-05-08 10:42 [Bug other/95005] New: zstd.h not found if installed in non-system prefix gcc at ikkoku dot de
                   ` (2 preceding siblings ...)
  2020-05-11  8:40 ` gcc at ikkoku dot de
@ 2020-05-11  9:31 ` marxin at gcc dot gnu.org
  2020-05-11  9:49 ` marxin at gcc dot gnu.org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-05-11  9:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95005

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Michael Kuhn from comment #2)
> (In reply to Martin Liška from comment #1)
> > Thank you for the bug report.
> > I'm sending a better patch, can you please test it?
> 
> I applied your patch on top of the GCC 10.1.0 tarball. Sadly, it still fails
> with the same error. It looks like ZSTD_CPPFLAGS is not actually
> exported/set anywhere (only available in configure), which is why I made use
> of ZSTD_INCLUDE.

You are right! It should be actually added to CXXFLAGS that are not respected
in gcc/Makefile:
https://github.com/gcc-mirror/gcc/blob/master/gcc/configure.ac#L1380

I'm investigating that.

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

* [Bug bootstrap/95005] zstd.h not found if installed in non-system prefix
  2020-05-08 10:42 [Bug other/95005] New: zstd.h not found if installed in non-system prefix gcc at ikkoku dot de
                   ` (3 preceding siblings ...)
  2020-05-11  9:31 ` marxin at gcc dot gnu.org
@ 2020-05-11  9:49 ` marxin at gcc dot gnu.org
  2020-05-12 10:49 ` gcc at ikkoku dot de
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-05-11  9:49 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95005

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |WAITING

--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
Hm, I must say that current master works for me:

$ ../configure --with-zstd=/tmp/sparta
...
$ make lto-compress.o
g++ -fno-PIE -c  -I/home/marxin/Programming/gcc/gcc/../zlib -g 
-I/tmp/sparta/include -DIN_GCC     -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common 
-DHAVE_CONFIG_H -I. -I. -I/home/marxin/Programming/gcc/gcc
-I/home/marxin/Programming/gcc/gcc/.
-I/home/marxin/Programming/gcc/gcc/../include
-I/home/marxin/Programming/gcc/gcc/../libcpp/include 
-I/home/marxin/Programming/gcc/gcc/../libdecnumber
-I/home/marxin/Programming/gcc/gcc/../libdecnumber/bid -I../libdecnumber
-I/home/marxin/Programming/gcc/gcc/../libbacktrace   -o lto-compress.o -MT
lto-compress.o -MMD -MP -MF ./.deps/lto-compress.TPo
/home/marxin/Programming/gcc/gcc/lto-compress.c

you can find "-I/tmp/sparta/include" at the command line.

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

* [Bug bootstrap/95005] zstd.h not found if installed in non-system prefix
  2020-05-08 10:42 [Bug other/95005] New: zstd.h not found if installed in non-system prefix gcc at ikkoku dot de
                   ` (4 preceding siblings ...)
  2020-05-11  9:49 ` marxin at gcc dot gnu.org
@ 2020-05-12 10:49 ` gcc at ikkoku dot de
  2020-05-13 13:26 ` marxin at gcc dot gnu.org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: gcc at ikkoku dot de @ 2020-05-12 10:49 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95005

Michael Kuhn <gcc at ikkoku dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #48482|0                           |1
        is obsolete|                            |

--- Comment #5 from Michael Kuhn <gcc at ikkoku dot de> ---
Created attachment 48516
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48516&action=edit
Updated zstd patch

Thanks for investigating! Sadly, this still does not work for me, even with
master.
If I do "make lto-compress.o" in the gcc subdirectory, it works (and includes
the include path), but a normal "make" in the build directory does not.

In Spack, another issue has come up: When building with Clang (as frequently
done on macOS), libzstd cannot be found. After some investigation, it seems
that the library path is also not set correctly.

I have come up with the attached updated patch that allows me build GCC with
zstd in a non-standard path. It is also a bit cleaner than the previous
approach.

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

* [Bug bootstrap/95005] zstd.h not found if installed in non-system prefix
  2020-05-08 10:42 [Bug other/95005] New: zstd.h not found if installed in non-system prefix gcc at ikkoku dot de
                   ` (5 preceding siblings ...)
  2020-05-12 10:49 ` gcc at ikkoku dot de
@ 2020-05-13 13:26 ` marxin at gcc dot gnu.org
  2020-05-20 19:35 ` gcc at ikkoku dot de
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-05-13 13:26 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95005

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW

--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
I support the patch. Can you please send it to gcc-patches mailing list?

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

* [Bug bootstrap/95005] zstd.h not found if installed in non-system prefix
  2020-05-08 10:42 [Bug other/95005] New: zstd.h not found if installed in non-system prefix gcc at ikkoku dot de
                   ` (6 preceding siblings ...)
  2020-05-13 13:26 ` marxin at gcc dot gnu.org
@ 2020-05-20 19:35 ` gcc at ikkoku dot de
  2020-05-20 22:29 ` egallager at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: gcc at ikkoku dot de @ 2020-05-20 19:35 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95005

--- Comment #7 from Michael Kuhn <gcc at ikkoku dot de> ---
Took me a while, sorry. I have just sent the patch to the list.

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

* [Bug bootstrap/95005] zstd.h not found if installed in non-system prefix
  2020-05-08 10:42 [Bug other/95005] New: zstd.h not found if installed in non-system prefix gcc at ikkoku dot de
                   ` (7 preceding siblings ...)
  2020-05-20 19:35 ` gcc at ikkoku dot de
@ 2020-05-20 22:29 ` egallager at gcc dot gnu.org
  2021-05-04 12:31 ` rguenth at gcc dot gnu.org
  2021-05-04 16:48 ` egallager at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: egallager at gcc dot gnu.org @ 2020-05-20 22:29 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95005

Eric Gallager <egallager at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |egallager at gcc dot gnu.org
                URL|                            |https://gcc.gnu.org/piperma
                   |                            |il/gcc-patches/2020-May/546
                   |                            |179.html
           Keywords|                            |patch

--- Comment #8 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Michael Kuhn from comment #7)
> Took me a while, sorry. I have just sent the patch to the list.

for reference, that patch is here:
https://gcc.gnu.org/pipermail/gcc-patches/2020-May/546179.html

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

* [Bug bootstrap/95005] zstd.h not found if installed in non-system prefix
  2020-05-08 10:42 [Bug other/95005] New: zstd.h not found if installed in non-system prefix gcc at ikkoku dot de
                   ` (8 preceding siblings ...)
  2020-05-20 22:29 ` egallager at gcc dot gnu.org
@ 2021-05-04 12:31 ` rguenth at gcc dot gnu.org
  2021-05-04 16:48 ` egallager at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-05-04 12:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95005

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

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

* [Bug bootstrap/95005] zstd.h not found if installed in non-system prefix
  2020-05-08 10:42 [Bug other/95005] New: zstd.h not found if installed in non-system prefix gcc at ikkoku dot de
                   ` (9 preceding siblings ...)
  2021-05-04 12:31 ` rguenth at gcc dot gnu.org
@ 2021-05-04 16:48 ` egallager at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: egallager at gcc dot gnu.org @ 2021-05-04 16:48 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95005

Eric Gallager <egallager at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|egallager at gcc dot gnu.org       |gcc at ikkoku dot de

--- Comment #9 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Eric Gallager from comment #8)
> (In reply to Michael Kuhn from comment #7)
> > Took me a while, sorry. I have just sent the patch to the list.
> 
> for reference, that patch is here:
> https://gcc.gnu.org/pipermail/gcc-patches/2020-May/546179.html

Er wait is that what caused me to become the assignee for this? I was just
linking to Michael's patch; it's not actually my own patch... changing assignee
to him...

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

end of thread, other threads:[~2021-05-04 16:48 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-08 10:42 [Bug other/95005] New: zstd.h not found if installed in non-system prefix gcc at ikkoku dot de
2020-05-09  7:06 ` [Bug bootstrap/95005] " marxin at gcc dot gnu.org
2020-05-11  7:18 ` marxin at gcc dot gnu.org
2020-05-11  8:40 ` gcc at ikkoku dot de
2020-05-11  9:31 ` marxin at gcc dot gnu.org
2020-05-11  9:49 ` marxin at gcc dot gnu.org
2020-05-12 10:49 ` gcc at ikkoku dot de
2020-05-13 13:26 ` marxin at gcc dot gnu.org
2020-05-20 19:35 ` gcc at ikkoku dot de
2020-05-20 22:29 ` egallager at gcc dot gnu.org
2021-05-04 12:31 ` rguenth at gcc dot gnu.org
2021-05-04 16:48 ` egallager at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).