* bug#29644: gcc-objc is unusable without its 'gcc' executable
@ 2017-12-10 14:26 宋文武
2017-12-10 18:49 ` Ricardo Wurmus
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: 宋文武 @ 2017-12-10 14:26 UTC (permalink / raw)
To: 29644
Hello, unlike fortran program files which can be compiled using the
command 'gfortran' (in addition to 'gcc'), there is no other command for
Objective-C program files, and run 'gcc -c x.m' using the 'gcc' package
will just complain "Objective-C compiler not installed on this system"
due to it lacking objc support.
I have to revert commit 82f145ef7a to get a objc enabled 'gcc' in the
'gcc-objc' package.
IIUC, the purpose of that commit is to avoid file collisions between
'gfortran' and the 'gcc' package used in the 'gnu-build-system', which
will broke the compiler in some way. So I think we really want to only
have one gcc package in an environment...
How about enable all languages (except 'brig' which I never heard of)
for the gcc-final and the 'gcc' (in gcc.scm) packages? In this way, I
think 'gnu-build-system' and 'gcc-toolchain' will able to compile
Fortran, Objective-C, Go, etc. out of the box.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#29644: gcc-objc is unusable without its 'gcc' executable
2017-12-10 14:26 bug#29644: gcc-objc is unusable without its 'gcc' executable 宋文武
@ 2017-12-10 18:49 ` Ricardo Wurmus
2022-03-26 5:49 ` Zhu Zihao
2023-09-02 21:01 ` Vivien Kraus via Bug reports for GNU Guix
2 siblings, 0 replies; 10+ messages in thread
From: Ricardo Wurmus @ 2017-12-10 18:49 UTC (permalink / raw)
To: 宋文武; +Cc: 29644
宋文武 <iyzsong@member.fsf.org> writes:
> Hello, unlike fortran program files which can be compiled using the
> command 'gfortran' (in addition to 'gcc'), there is no other command for
> Objective-C program files, and run 'gcc -c x.m' using the 'gcc' package
> will just complain "Objective-C compiler not installed on this system"
> due to it lacking objc support.
>
> I have to revert commit 82f145ef7a to get a objc enabled 'gcc' in the
> 'gcc-objc' package.
In May 2016 I first noticed this problem with GCC and investigated
solutions.
The fix here is to patch “lang-spec.h”, so that it does not limit the
gcc executable to the configured set of languages. This way we will be
able to use the same gcc executable with different languages.
--
Ricardo
GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
https://elephly.net
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#29644: gcc-objc is unusable without its 'gcc' executable.
2017-12-10 14:26 bug#29644: gcc-objc is unusable without its 'gcc' executable 宋文武
2017-12-10 18:49 ` Ricardo Wurmus
@ 2022-03-26 5:49 ` Zhu Zihao
2022-03-26 10:16 ` Maxime Devos
2023-09-02 21:01 ` Vivien Kraus via Bug reports for GNU Guix
2 siblings, 1 reply; 10+ messages in thread
From: Zhu Zihao @ 2022-03-26 5:49 UTC (permalink / raw)
To: 29644
[-- Attachment #1: Type: text/plain, Size: 289 bytes --]
I'm planning to package some GNUStep packages to Guix, but the gcc-objc
is broken.
Any one interested in fixing GCC? or I' ll plan to make gnustep-make use
clang instead of GCC.
--
Retrieve my PGP public key:
gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F
Zihao
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 255 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#29644: gcc-objc is unusable without its 'gcc' executable.
2022-03-26 5:49 ` Zhu Zihao
@ 2022-03-26 10:16 ` Maxime Devos
2022-03-26 10:53 ` Zhu Zihao
0 siblings, 1 reply; 10+ messages in thread
From: Maxime Devos @ 2022-03-26 10:16 UTC (permalink / raw)
To: Zhu Zihao, 29644
[-- Attachment #1: Type: text/plain, Size: 278 bytes --]
Zhu Zihao schreef op za 26-03-2022 om 13:49 [+0800]:
> I'm planning to package some GNUStep packages to Guix, but the gcc-
> objc is broken.
>
> Any one interested in fixing GCC? [...]
How is it broken? Is there some error message or something?
Greetings,
Maxime.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#29644: gcc-objc is unusable without its 'gcc' executable.
2022-03-26 10:16 ` Maxime Devos
@ 2022-03-26 10:53 ` Zhu Zihao
2022-03-26 12:29 ` Maxime Devos
0 siblings, 1 reply; 10+ messages in thread
From: Zhu Zihao @ 2022-03-26 10:53 UTC (permalink / raw)
To: Maxime Devos; +Cc: 29644
[-- Attachment #1: Type: text/plain, Size: 1339 bytes --]
You can try with (on d05fcc21cb9509084a0424e6808b84b58dc52d62, but I
guess the commit doesn't matters.)
```
guix shell gcc@10 gcc-objc@10 clang@13
cat > hello.m << "EOF"
#include <stdio.h>
int main(int argc, const char * argv[]) {
printf ("Hello, world!\n");
return 0;
}
EOF
```
`LANG=C gcc hello.m -o hello` complains that Objective-C compiler is not
installed.
`LANG=C clang hello.m -o hello` can compile to hello binary.
Even I try set environment variable GCC_EXEC_PREFIX (described in
https://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html)
GCC_EXEC_PREFIX=$GUIX_ENVIRONMENT/libexec/gcc/x86_64-unknown-linux-gnu/10.3.0 gcc hello.m -o hello
or pass option
`-B$GUIX_ENVIRONMENT/libexec/gcc/x86_64-unknown-linux-gnu/10.3.0`. It
still says no Objective-C compiler.
Maxime Devos <maximedevos@telenet.be> writes:
> [[PGP Signed Part:Undecided]]
> Zhu Zihao schreef op za 26-03-2022 om 13:49 [+0800]:
>> I'm planning to package some GNUStep packages to Guix, but the gcc-
>> objc is broken.
>>
>> Any one interested in fixing GCC? [...]
>
> How is it broken? Is there some error message or something?
>
> Greetings,
> Maxime.
>
> [[End of PGP Signed Part]]
--
Retrieve my PGP public key:
gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F
Zihao
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 255 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#29644: gcc-objc is unusable without its 'gcc' executable.
2022-03-26 10:53 ` Zhu Zihao
@ 2022-03-26 12:29 ` Maxime Devos
2022-03-26 14:14 ` Zhu Zihao
0 siblings, 1 reply; 10+ messages in thread
From: Maxime Devos @ 2022-03-26 12:29 UTC (permalink / raw)
To: Zhu Zihao; +Cc: 29644
[-- Attachment #1: Type: text/plain, Size: 1441 bytes --]
Zhu Zihao schreef op za 26-03-2022 om 18:53 [+0800]:
> `LANG=C gcc hello.m -o hello` complains that Objective-C compiler is
> not installed.
I noticed the output of "guix build gcc-objc" does not contain any
binaries in 'bin' and neither does there appear to be some objc shared
library. I guess this is caused by the following line:
(add-after 'install 'remove-broken-or-conflicting-files
(lambda* (#:key outputs #:allow-other-keys)
(for-each
delete-file
(find-files (string-append (assoc-ref outputs "out")
"/bin")
".*(c\\+\\+|cpp|g\\+\\+|gcov|gcc|lto)(-
.*)?$"))))))))))
I'm wondering if any of the following commits fix or break things:
* 5318bade32e2a3a801e838286439074aeaf1e3c7
(this one modified the regex)
* a159586f8ae4db8a0fcf608b411f962817c3db60
(the commit before)
* 82f145ef7aef8f4d28a144ee8efcadf3fdd4b877
(this one introduced the phase)
* ce6027bf43210d0b68bb26dbf110ca6c47aa8478
(the commit before)
Make sure to run this in an environment "guix environment --pure --ad-hoc gcc-objc"
(*) without the "gcc" package, to avoid the gcc package overriding the
hypothetical gcc from the "gcc-objc" package.
Or maybe some plugin architecture is used, I don't know..
Greetings,
Maxime.
(*) some of these commits are from before the introduction of "guix shell"
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#29644: gcc-objc is unusable without its 'gcc' executable.
2022-03-26 12:29 ` Maxime Devos
@ 2022-03-26 14:14 ` Zhu Zihao
2022-03-26 14:50 ` Maxime Devos
0 siblings, 1 reply; 10+ messages in thread
From: Zhu Zihao @ 2022-03-26 14:14 UTC (permalink / raw)
To: Maxime Devos; +Cc: 29644
[-- Attachment #1: Type: text/plain, Size: 323 bytes --]
Maxime Devos <maximedevos@telenet.be> writes:
> Or maybe some plugin architecture is used, I don't know..
I think the problem is pointed out by Ricardo Wurmus in this reply https://issues.guix.gnu.org/29644#1
--
Retrieve my PGP public key:
gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F
Zihao
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 255 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#29644: gcc-objc is unusable without its 'gcc' executable.
2022-03-26 14:14 ` Zhu Zihao
@ 2022-03-26 14:50 ` Maxime Devos
0 siblings, 0 replies; 10+ messages in thread
From: Maxime Devos @ 2022-03-26 14:50 UTC (permalink / raw)
To: Zhu Zihao; +Cc: 29644
[-- Attachment #1: Type: text/plain, Size: 372 bytes --]
Zhu Zihao schreef op za 26-03-2022 om 22:14 [+0800]:
> Maxime Devos <maximedevos@telenet.be> writes:
>
> > Or maybe some plugin architecture is used, I don't know..
>
> I think the problem is pointed out by Ricardo Wurmus in this reply https://issues.guix.gnu.org/29644#1
Ok, I thought this was a new bug report, but apparently it is a reply
to an old report.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#29644: gcc-objc is unusable without its 'gcc' executable
2017-12-10 14:26 bug#29644: gcc-objc is unusable without its 'gcc' executable 宋文武
2017-12-10 18:49 ` Ricardo Wurmus
2022-03-26 5:49 ` Zhu Zihao
@ 2023-09-02 21:01 ` Vivien Kraus via Bug reports for GNU Guix
2023-11-06 8:55 ` Efraim Flashner
2 siblings, 1 reply; 10+ messages in thread
From: Vivien Kraus via Bug reports for GNU Guix @ 2023-09-02 21:01 UTC (permalink / raw)
To: 29644
Hello!
I would like to learn and play with gnustep with objective-C, but it
seems like GCC does not come with objective-C in Guix.
I don’t know much about GCC or how Guix packages it. There is an early
comment by Ricardo Wurmus:
> The fix here is to patch “lang-spec.h”, so that it does not limit the
> gcc executable to the configured set of languages. This way we will
> be
> able to use the same gcc executable with different languages.
The source of gcc-objc has a file named gcc-12.3.0/gcc/objc/lang-
specs.h that claims to be included as a static array literal, but I
don’t know what the rest of this citation means.
Vivien
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#29644: gcc-objc is unusable without its 'gcc' executable
2023-09-02 21:01 ` Vivien Kraus via Bug reports for GNU Guix
@ 2023-11-06 8:55 ` Efraim Flashner
0 siblings, 0 replies; 10+ messages in thread
From: Efraim Flashner @ 2023-11-06 8:55 UTC (permalink / raw)
To: Vivien Kraus; +Cc: 29644, Zhu Zihao
[-- Attachment #1.1: Type: text/plain, Size: 1290 bytes --]
On Sat, Sep 02, 2023 at 11:01:44PM +0200, Vivien Kraus via Bug reports for GNU Guix wrote:
> Hello!
>
> I would like to learn and play with gnustep with objective-C, but it
> seems like GCC does not come with objective-C in Guix.
>
> I don’t know much about GCC or how Guix packages it. There is an early
> comment by Ricardo Wurmus:
>
> > The fix here is to patch “lang-spec.h”, so that it does not limit the
> > gcc executable to the configured set of languages. This way we will
> > be
> > able to use the same gcc executable with different languages.
>
> The source of gcc-objc has a file named gcc-12.3.0/gcc/objc/lang-
> specs.h that claims to be included as a static array literal, but I
> don’t know what the rest of this citation means.
I've appended a diff of the lib output of gcc and gcc-objc. According to
du adding objc support to regular gcc would increase the lib output by
368K. I think our best option is to move forward with adding objc/objc++
as languages which gcc simply provides without needing a separate
package.
--
Efraim Flashner <efraim@flashner.co.il> רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #1.2: gcc-objc-diff --]
[-- Type: text/plain, Size: 1222 bytes --]
1c1
< /gnu/store/sxnv230gv2mj5x9v3gfadw118gkl2rcf-gcc-10.5.0-lib/
---
> /gnu/store/1p8hc8mrigismnndycwih2k2015v0z1q-gcc-objc-10.5.0-lib/
78a79,89
> │ │ │ ├── objc
> │ │ │ │ ├── message.h
> │ │ │ │ ├── NXConstStr.h
> │ │ │ │ ├── objc-decls.h
> │ │ │ │ ├── objc-exception.h
> │ │ │ │ ├── objc.h
> │ │ │ │ ├── objc-sync.h
> │ │ │ │ ├── Object.h
> │ │ │ │ ├── Protocol.h
> │ │ │ │ ├── runtime.h
> │ │ │ │ └── thr.h
645a657,661
> │ ├── libobjc.a
> │ ├── libobjc.la
> │ ├── libobjc.so -> libobjc.so.4.0.0
> │ ├── libobjc.so.4 -> libobjc.so.4.0.0
> │ ├── libobjc.so.4.0.0
682c698
< │ └── gcc-10.5.0
---
> │ └── gcc-objc-10.5.0
697c713
< 34 directories, 661 files
---
> 35 directories, 676 files
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2023-11-06 8:55 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-10 14:26 bug#29644: gcc-objc is unusable without its 'gcc' executable 宋文武
2017-12-10 18:49 ` Ricardo Wurmus
2022-03-26 5:49 ` Zhu Zihao
2022-03-26 10:16 ` Maxime Devos
2022-03-26 10:53 ` Zhu Zihao
2022-03-26 12:29 ` Maxime Devos
2022-03-26 14:14 ` Zhu Zihao
2022-03-26 14:50 ` Maxime Devos
2023-09-02 21:01 ` Vivien Kraus via Bug reports for GNU Guix
2023-11-06 8:55 ` Efraim Flashner
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
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.