Github messages for voidlinux
 help / color / mirror / Atom feed
* [ISSUE] Tcc won't link executables
@ 2021-05-02 13:34 niansa
  2021-05-05 12:50 ` loreb
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: niansa @ 2021-05-02 13:34 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 631 bytes --]

New issue by niansa on void-packages repository

https://github.com/void-linux/void-packages/issues/30630

Description:
<!-- Don't request update of package. We have a script for that. https://alpha.de.repo.voidlinux.org/void-updates/void-updates.txt . However, a quality pull request may help. -->
### System

* xuname:  
  Void 5.11.17_1 x86_64 GenuineIntel notuptodate rrmFFF
* package:  
  tcc 0.9.27.20191027.1_1

### Expected behavior
Executable file should be generated by tcc

### Actual behavior
    tcc: error: file 'crtn.o' not found

### Steps to reproduce the behavior
    echo "int main(){}" | tcc -


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

* Re: Tcc won't link executables
  2021-05-02 13:34 [ISSUE] Tcc won't link executables niansa
@ 2021-05-05 12:50 ` loreb
  2021-05-05 14:25 ` ericonr
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: loreb @ 2021-05-05 12:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 882 bytes --]

New comment by loreb on void-packages repository

https://github.com/void-linux/void-packages/issues/30630#issuecomment-832661216

Comment:
Confirmed; it works fine (musl&glibc) after installing gcc (probably also clang), but their templates are complicated enough that imho the easiest solution would be to depend on one or the other, even if it pulls in some unnecessary dependencies.

If you feel like doing some boring work:
- install gcc; confirm that tcc works, and write down which packages were installed
- uninstall the packages from above
- try installing&uninstalling until you find the smallest set of gcc dependencies that gets tcc working
- report your findings
- repeat on a musl virtual machine (or use WSL on windows 10 or something)

Of course. if you wish not to lose your sanity, do the first step by hand, and then write a **script** to do the rest!!!

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

* Re: Tcc won't link executables
  2021-05-02 13:34 [ISSUE] Tcc won't link executables niansa
  2021-05-05 12:50 ` loreb
@ 2021-05-05 14:25 ` ericonr
  2021-08-23 21:04 ` hiltjo
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: ericonr @ 2021-05-05 14:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 183 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/issues/30630#issuecomment-832731302

Comment:
Could try `glibc-devel` or `musl-devel`.

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

* Re: Tcc won't link executables
  2021-05-02 13:34 [ISSUE] Tcc won't link executables niansa
  2021-05-05 12:50 ` loreb
  2021-05-05 14:25 ` ericonr
@ 2021-08-23 21:04 ` hiltjo
  2021-08-24 19:02 ` loreb
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: hiltjo @ 2021-08-23 21:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 228 bytes --]

New comment by hiltjo on void-packages repository

https://github.com/void-linux/void-packages/issues/30630#issuecomment-904130090

Comment:
Hi, this is still broken and has been broken for quite a while now on VoidLinux glibc.

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

* Re: Tcc won't link executables
  2021-05-02 13:34 [ISSUE] Tcc won't link executables niansa
                   ` (2 preceding siblings ...)
  2021-08-23 21:04 ` hiltjo
@ 2021-08-24 19:02 ` loreb
  2021-08-25 16:56 ` hiltjo
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: loreb @ 2021-08-24 19:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 547 bytes --]

New comment by loreb on void-packages repository

https://github.com/void-linux/void-packages/issues/30630#issuecomment-904898353

Comment:
@hiltjo @niansa 

It stayed broken because 99.9% of the people who install tcc also install gcc/clang, which happen to pull in the required dependency :)

Copy/paste the fix from gcc's template:
```
case "$XBPS_TARGET_MACHINE" in
        *-musl)  depends+=" musl-devel";;
        *)       depends+=" glibc-devel";;
esac
```

and submit a pull request (unless it's troublesome for some reason)


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

* Re: Tcc won't link executables
  2021-05-02 13:34 [ISSUE] Tcc won't link executables niansa
                   ` (3 preceding siblings ...)
  2021-08-24 19:02 ` loreb
@ 2021-08-25 16:56 ` hiltjo
  2021-08-25 18:55 ` loreb
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: hiltjo @ 2021-08-25 16:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 482 bytes --]

New comment by hiltjo on void-packages repository

https://github.com/void-linux/void-packages/issues/30630#issuecomment-905709705

Comment:
Hi,

Have you tested that fix on Void Linux **glibc**?

I've had gcc, clang and glibc-devel installed, so that's not the issue I think.

But even if it would be the solution then maybe it should be documented somewhere this file is required. Some distributions show such information when the package is installed (just an idea).




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

* Re: Tcc won't link executables
  2021-05-02 13:34 [ISSUE] Tcc won't link executables niansa
                   ` (4 preceding siblings ...)
  2021-08-25 16:56 ` hiltjo
@ 2021-08-25 18:55 ` loreb
  2021-08-30  9:43 ` loreb
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: loreb @ 2021-08-25 18:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 422 bytes --]

New comment by loreb on void-packages repository

https://github.com/void-linux/void-packages/issues/30630#issuecomment-905790743

Comment:
@hiltjo I tried it above in https://github.com/void-linux/void-packages/issues/30630#issuecomment-834266375
except that I tried it by installing musl/glibc void in qemu and installing musl-devel/glibc-devel by hand instead of fixing the template, but I expect that it should work.

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

* Re: Tcc won't link executables
  2021-05-02 13:34 [ISSUE] Tcc won't link executables niansa
                   ` (5 preceding siblings ...)
  2021-08-25 18:55 ` loreb
@ 2021-08-30  9:43 ` loreb
  2022-05-15 18:48 ` hiltjo
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: loreb @ 2021-08-30  9:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 821 bytes --]

New comment by loreb on void-packages repository

https://github.com/void-linux/void-packages/issues/30630#issuecomment-908199951

Comment:
@hiltjo wait, I believe we have a miscommunication...

My assumptions:
1. the bugfix is simple, so ericonr is leaving it for grabs (as a first PR or something like that)
2. you or niansa care enough to submit a PR

The template is the file used by the package manager to get the info it needs about the package, in this case its dependencies; adding the dependencies above in an empty install makes tcc work, and those lines are copy/pasted from gcc's dependencies, so adding them to the template (srcpkgs/tcc/template) should fix the bug.

If you or @niansa want to submit a PR, it's pretty much written for you; otherwise @ericonr can you add a "good first issue" label?

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

* Re: Tcc won't link executables
  2021-05-02 13:34 [ISSUE] Tcc won't link executables niansa
                   ` (6 preceding siblings ...)
  2021-08-30  9:43 ` loreb
@ 2022-05-15 18:48 ` hiltjo
  2022-05-16 15:38 ` loreb
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: hiltjo @ 2022-05-15 18:48 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 232 bytes --]

New comment by hiltjo on void-packages repository

https://github.com/void-linux/void-packages/issues/30630#issuecomment-1126995173

Comment:
This is still broken on the glibc version. I have glibc-devel, clang and gcc installed...

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

* Re: Tcc won't link executables
  2021-05-02 13:34 [ISSUE] Tcc won't link executables niansa
                   ` (7 preceding siblings ...)
  2022-05-15 18:48 ` hiltjo
@ 2022-05-16 15:38 ` loreb
  2022-05-16 20:01 ` hiltjo
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: loreb @ 2022-05-16 15:38 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 336 bytes --]

New comment by loreb on void-packages repository

https://github.com/void-linux/void-packages/issues/30630#issuecomment-1127827828

Comment:
@hiltjo Just to be sure we are seeing the same thing: on a glibc vm I see the crt1.o error **and** it works anyway, ie `tcc helloworld.c && ./a.out` prints "hello world", is it the same for you?

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

* Re: Tcc won't link executables
  2021-05-02 13:34 [ISSUE] Tcc won't link executables niansa
                   ` (8 preceding siblings ...)
  2022-05-16 15:38 ` loreb
@ 2022-05-16 20:01 ` hiltjo
  2022-05-16 20:02 ` hiltjo
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: hiltjo @ 2022-05-16 20:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 319 bytes --]

New comment by hiltjo on void-packages repository

https://github.com/void-linux/void-packages/issues/30630#issuecomment-1128080471

Comment:
Yeah, that seems to work.

The displayed errors are:
/usr/lib/crt1.o: error: Invalid relocation entry [14] '.rela.debug_info' @ 000004f6
tcc: error: file 'crt1.o' not found

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

* Re: Tcc won't link executables
  2021-05-02 13:34 [ISSUE] Tcc won't link executables niansa
                   ` (9 preceding siblings ...)
  2022-05-16 20:01 ` hiltjo
@ 2022-05-16 20:02 ` hiltjo
  2022-05-18 15:25 ` loreb
  2022-05-19 12:18 ` ericonr
  12 siblings, 0 replies; 14+ messages in thread
From: hiltjo @ 2022-05-16 20:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 331 bytes --]

New comment by hiltjo on void-packages repository

https://github.com/void-linux/void-packages/issues/30630#issuecomment-1128080471

Comment:
Yeah, the binary seems to work.

The displayed errors are still:
/usr/lib/crt1.o: error: Invalid relocation entry [14] '.rela.debug_info' @ 000004f6
tcc: error: file 'crt1.o' not found

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

* Re: Tcc won't link executables
  2021-05-02 13:34 [ISSUE] Tcc won't link executables niansa
                   ` (10 preceding siblings ...)
  2022-05-16 20:02 ` hiltjo
@ 2022-05-18 15:25 ` loreb
  2022-05-19 12:18 ` ericonr
  12 siblings, 0 replies; 14+ messages in thread
From: loreb @ 2022-05-18 15:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 731 bytes --]

New comment by loreb on void-packages repository

https://github.com/void-linux/void-packages/issues/30630#issuecomment-1130161417

Comment:
@hiltjo The problem is that upstream hasn't made a release in the past years and the package is orphaned...
meaning that I have **no idea** if the upstream is conservative ("every commit could be a release!") or more let's say experimental ("there's a good reason we haven't made a release..."); the latest commit doesn't have this problem (just tested in a vm), so go on, git bisect and submit a pr to fix the crt1.o issue as well.

Before you ask: the package works well enough for me as is, I only use tcc for scripts ("#! /usr/bin/tcc -run"), and that works fine even on void/glibc.

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

* Re: Tcc won't link executables
  2021-05-02 13:34 [ISSUE] Tcc won't link executables niansa
                   ` (11 preceding siblings ...)
  2022-05-18 15:25 ` loreb
@ 2022-05-19 12:18 ` ericonr
  12 siblings, 0 replies; 14+ messages in thread
From: ericonr @ 2022-05-19 12:18 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 275 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/issues/30630#issuecomment-1131615278

Comment:
I don't think releases are planned anymore, the development model is a public git branch that basically anyone can send stuff into.

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

end of thread, other threads:[~2022-05-19 12:18 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-02 13:34 [ISSUE] Tcc won't link executables niansa
2021-05-05 12:50 ` loreb
2021-05-05 14:25 ` ericonr
2021-08-23 21:04 ` hiltjo
2021-08-24 19:02 ` loreb
2021-08-25 16:56 ` hiltjo
2021-08-25 18:55 ` loreb
2021-08-30  9:43 ` loreb
2022-05-15 18:48 ` hiltjo
2022-05-16 15:38 ` loreb
2022-05-16 20:01 ` hiltjo
2022-05-16 20:02 ` hiltjo
2022-05-18 15:25 ` loreb
2022-05-19 12:18 ` ericonr

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 NNTP newsgroup(s).