public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug modula2/108480] New: gm2 fails to find SYSTEM module after relocation
@ 2023-01-20 13:45 rguenth at gcc dot gnu.org
  2023-01-20 15:16 ` [Bug modula2/108480] " iains at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-01-20 13:45 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 108480
           Summary: gm2 fails to find SYSTEM module after relocation
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: modula2
          Assignee: gaius at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

When you relocate the installed GCC tree (or install with DESTDIR=/some/path)
then gm2 will not find the SYSTEM module since all -I and -L arguments are
not relative to the install location:

> /space/rguenther/install/trunk-r13-5267/usr/local/bin/gm2 -o a.out -fiso coroutine.mod -v
Driving: /space/rguenther/install/trunk-r13-5267/usr/local/bin/gm2 -o a.out
-fiso coroutine.mod -v -fgen-module-list=- -I
/usr/local/lib64/gcc/x86_64-pc-linux-gnu/13.0.1/m2/m2iso -I
/usr/local/lib64/gcc/x86_64-pc-linux-gnu/13.0.1/m2/m2pim -fplugin=m2rte -L
/usr/local/lib64/gcc/x86_64-pc-linux-gnu/13.0.1/m2/m2iso -l m2iso -L
/usr/local/lib64/gcc/x86_64-pc-linux-gnu/13.0.1/m2/m2pim -l m2pim -l stdc++ -l
m -l pthread -shared-libgcc
new argc = 17, added_libraries = 3
Using built-in specs.
COLLECT_GCC=/space/rguenther/install/trunk-r13-5267/usr/local/bin/gm2
COLLECT_LTO_WRAPPER=/home/space/rguenther/install/trunk-r13-5267/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/13.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /space/rguenther/src/gcc/configure
--enable-languages=c,c++,fortran,m2 --disable-libstdcxx-pch --disable-bootstrap
--enable-checking=release
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.0.1 20230120 (experimental) (GCC) 
COLLECT_GCC_OPTIONS='-o' 'a.out' '-fiso' '-v' '-fgen-module-list=-' '-I'
'/usr/local/lib64/gcc/x86_64-pc-linux-gnu/13.0.1/m2/m2iso' '-I'
'/usr/local/lib64/gcc/x86_64-pc-linux-gnu/13.0.1/m2/m2pim' '-fplugin=m2rte'
'-L/usr/local/lib64/gcc/x86_64-pc-linux-gnu/13.0.1/m2/m2iso'
'-L/usr/local/lib64/gcc/x86_64-pc-linux-gnu/13.0.1/m2/m2pim' '-shared-libgcc'
'-mtune=generic' '-march=x86-64' '-dumpdir' 'a-'

/home/space/rguenther/install/trunk-r13-5267/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/13.0.1/cc1gm2
-iplugindir=/home/space/rguenther/install/trunk-r13-5267/usr/local/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.0.1/plugin
-quiet -dumpdir a- -dumpbase coroutine.mod -dumpbase-ext .mod -mtune=generic
-march=x86-64 -version -fiso -fgen-module-list=- -fplugin=m2rte -fiso
-fgen-module-list=- -fplugin=m2rte -I
/usr/local/lib64/gcc/x86_64-pc-linux-gnu/13.0.1/m2/m2iso -I
/usr/local/lib64/gcc/x86_64-pc-linux-gnu/13.0.1/m2/m2pim -v coroutine.mod -o
/tmp/ccR3avKM.s
GNU Modula-2 (GCC) version 13.0.1 20230120 (experimental) (x86_64-pc-linux-gnu)
        compiled by GNU C version 7.5.0, GMP version 6.1.2, MPFR version
4.0.2-p6, MPC version 1.1.0, isl version isl-0.22.1-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Versions of loaded plugins:
 m2rte: Unknown version.
GNU Modula-2 (GCC) version 13.0.1 20230120 (experimental) (x86_64-pc-linux-gnu)
        compiled by GNU C version 7.5.0, GMP version 6.1.2, MPFR version
4.0.2-p6, MPC version 1.1.0, isl version isl-0.22.1-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Versions of loaded plugins:
 m2rte: Unknown version.
<built-in>: error: the file containing the definition module ‘SYSTEM’ cannot be
found

that's different from GCC:

> /space/rguenther/install/trunk-r13-5267/usr/local/bin/gcc t.c -v
Using built-in specs.
COLLECT_GCC=/space/rguenther/install/trunk-r13-5267/usr/local/bin/gcc
COLLECT_LTO_WRAPPER=/home/space/rguenther/install/trunk-r13-5267/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/13.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /space/rguenther/src/gcc/configure
--enable-languages=c,c++,fortran,m2 --disable-libstdcxx-pch --disable-bootstrap
--enable-checking=release
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.0.1 20230120 (experimental) (GCC) 
COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=x86-64' '-dumpdir' 'a-'

/home/space/rguenther/install/trunk-r13-5267/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/13.0.1/cc1
-quiet -v -iprefix
/home/space/rguenther/install/trunk-r13-5267/usr/local/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.0.1/
t.c -quiet -dumpdir a- -dumpbase t.c -dumpbase-ext .c -mtune=generic
-march=x86-64 -version -o /tmp/ccRkTB0l.s
...

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

* [Bug modula2/108480] gm2 fails to find SYSTEM module after relocation
  2023-01-20 13:45 [Bug modula2/108480] New: gm2 fails to find SYSTEM module after relocation rguenth at gcc dot gnu.org
@ 2023-01-20 15:16 ` iains at gcc dot gnu.org
  2023-01-23 17:29 ` cvs-commit at gcc dot gnu.org
  2023-01-24 10:16 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: iains at gcc dot gnu.org @ 2023-01-20 15:16 UTC (permalink / raw)
  To: gcc-bugs

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

Iain Sandoe <iains at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |iains at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW
                URL|                            |https://gcc.gnu.org/piperma
                   |                            |il/gcc-patches/2023-January
                   |                            |/610099.html
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2023-01-20

--- Comment #1 from Iain Sandoe <iains at gcc dot gnu.org> ---
this https://gcc.gnu.org/pipermail/gcc-patches/2023-January/610099.html
fixes relocation of the compiler.

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

* [Bug modula2/108480] gm2 fails to find SYSTEM module after relocation
  2023-01-20 13:45 [Bug modula2/108480] New: gm2 fails to find SYSTEM module after relocation rguenth at gcc dot gnu.org
  2023-01-20 15:16 ` [Bug modula2/108480] " iains at gcc dot gnu.org
@ 2023-01-23 17:29 ` cvs-commit at gcc dot gnu.org
  2023-01-24 10:16 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-01-23 17:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Iain D Sandoe <iains@gcc.gnu.org>:

https://gcc.gnu.org/g:47b269caf87904fd0112e8c9e96884dd0313ed15

commit r13-5308-g47b269caf87904fd0112e8c9e96884dd0313ed15
Author: Iain Sandoe <iain@sandoe.co.uk>
Date:   Wed Jan 11 10:22:34 2023 +0000

    modula-2, driver, Front end: Revise handling of I and L paths [PR108182].

    The adds the includes in the FE as done in other GCC languages.
    It also revises the library handling to avoid additional -L options
    from hiding LIBDIR.

    For the include/import paths as presented to the front end initialisation,
    we capture them and then arrange to emit the 'standard library' paths in
    the same order as specified for C.

    The specs are tidied up.

    The use of the internal prefix also fixes searching in a relocated
compiler.

    Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>

            PR modula2/108182
            PR modula2/108480

    gcc/m2/ChangeLog:

            * Make-lang.in: Pass libsubdir to the language init
            build.
            * gm2-lang.cc (INCLUDE_VECTOR): Define.
            (add_one_import_path): New.
            (add_m2_import_paths): New.
            (gm2_langhook_post_options): Arrange to add the include
            paths (and add the system ones) in the same order as C
            uses.
            * gm2spec.cc (build_archive_path): Remove.
            (add_default_combination): Remove.
            (add_default_archives): Remove.
            (add_default_libs): We no longer need a '-L' option, just
            emit the -l and each library in use.
            (build_include_path): Remove.
            (add_include): Remove.
            (add_default_includes): Remove.
            (library_installed): Remove.
            (check_valid_library): Remove.
            (check_valid_list): Remove.
            (convert_abbreviation): Diagnose unhandled cases.
            (lang_specific_driver): Skip options where we will add back
            a validated version.
            * lang-specs.h (M2CPP): Reformat, append %I when -fcpp is not
            in use.  Revise the cc1gm2 spec to omit mentioning options that
            are handled in the c pre-processor line.
            * lang.opt: Allow preprocessing and path options as input to the
            cc1gm2 invocation, so that they can be passed to the preprocessor
            invocation.

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

* [Bug modula2/108480] gm2 fails to find SYSTEM module after relocation
  2023-01-20 13:45 [Bug modula2/108480] New: gm2 fails to find SYSTEM module after relocation rguenth at gcc dot gnu.org
  2023-01-20 15:16 ` [Bug modula2/108480] " iains at gcc dot gnu.org
  2023-01-23 17:29 ` cvs-commit at gcc dot gnu.org
@ 2023-01-24 10:16 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-01-24 10:16 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
I checked and this seems now fixed.

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

end of thread, other threads:[~2023-01-24 10:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-20 13:45 [Bug modula2/108480] New: gm2 fails to find SYSTEM module after relocation rguenth at gcc dot gnu.org
2023-01-20 15:16 ` [Bug modula2/108480] " iains at gcc dot gnu.org
2023-01-23 17:29 ` cvs-commit at gcc dot gnu.org
2023-01-24 10:16 ` rguenth 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).