Bug 34372 - tcc does not compile simple hello.c
Summary: tcc does not compile simple hello.c
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 9
Hardware: All Linux
Priority: Normal major
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA9-64-OK
Keywords: advisory, validated_update
Depends on:
Blocks:
 
Reported: 2025-06-14 15:45 CEST by papoteur
Modified: 2025-06-16 19:39 CEST (History)
3 users (show)

See Also:
Source RPM: tcc-0.9.27-9+git20200814.62c30a4a.mga9
CVE:
Status comment:


Attachments

Description papoteur 2025-06-14 15:45:36 CEST
Description of problem:
tcc hello.c -o hello
tcc: error: file 'crt1.o' not found
tcc: error: file 'crti.o' not found
/lib/libc.so.6: error: bad architecture
/usr/lib/libc.so.6: error: bad architecture
/lib/libc.so.6: error: bad architecture
tcc: error: /usr/lib/libc.so: unrecognized file type 0
/lib/libc.so.6: error: bad architecture
/usr/lib/libc.so.6: error: bad architecture
/lib/libc.so.6: error: bad architecture
tcc: error: /lib/libc.so: unrecognized file type 0
/usr/lib/libc.a: error: invalid object file
/lib/libc.a: error: invalid object file
tcc: error: library 'c' not found
tcc: error: file 'crtn.o' not found
tcc: error: undefined symbol 'printf'


Version-Release number of selected component (if applicable):

How reproducible:
Always
Comment 1 papoteur 2025-06-14 15:51:18 CEST
In spec, we have

%build
%configure --debug --triplet=%{_build} --disable-static --disable-rpath
%__make

Removing triplet option give a working executable.
Why do we have this option? Is it save to remove it?

Whiteboard: (none) => MGA9TOO

Comment 2 David GEIGER 2025-06-14 16:05:21 CEST
Remove it if it gives a working pkg.

CC: (none) => geiger.david68210

Comment 3 papoteur 2025-06-15 20:48:24 CEST
Submitting:
RPMS:
tcc-0.9.28-0.git20250528.1.mga9
SRPMS
tcc-0.9.28-0.git20250528.1.mga9

Assignee: bugsquad => qa-bugs
Whiteboard: MGA9TOO => (none)
Version: Cauldron => 9
Source RPM: tcc-0.9.28-0.git20250213.2.mga10 => tcc-0.9.27-9+git20200814.62c30a4a.mga9

Comment 4 papoteur 2025-06-15 23:02:42 CEST
Here is a simple program to compile for test:
// hello.c
 
#include <stdio.h>
int main(void)
{
  printf("Hello\n");
  return 0;
}

The compilation is done with:
tcc hello.c -o hello
If no error occurs, program hello is created and can be launched with ./hello
katnatek 2025-06-15 23:42:04 CEST

Keywords: (none) => advisory

Comment 5 katnatek 2025-06-15 23:51:01 CEST
RH x86_64

 tcc hello.c -o hello
tcc: error: file 'crt1.o' not found
tcc: error: file 'crti.o' not found
/lib/libc.so.6: error: bad architecture
/usr/lib/libc.so.6: error: bad architecture
/lib/libc.so.6: error: bad architecture
tcc: error: /usr/lib/libc.so: unrecognized file type 0
/lib/libc.so.6: error: bad architecture
/usr/lib/libc.so.6: error: bad architecture
/lib/libc.so.6: error: bad architecture
tcc: error: /lib/libc.so: unrecognized file type 0
tcc: error: library 'c' not found
tcc: error: file 'crtn.o' not found
tcc: error: undefined symbol 'printf'

installing tcc-0.9.28-0.git20250528.1.mga9.x86_64.rpm from //home/katnatek/qa-testing/x86_64
Preparing...                     ##################################################################################################
      1/1: tcc                   ##################################################################################################
      1/1: removing tcc-0.9.27-9+git20200814.62c30a4a.mga9.x86_64
                                 ##################################################################################################

tcc hello.c -o hello

Not produce output

ls -l hello*
-rwxr-xr-x 1 katnatek katnatek 3954 jun 15 15:49 hello*
-rw-rw-r-- 1 katnatek katnatek   84 jun 15 15:45 hello.c


./hello 
Hello

Whiteboard: (none) => MGA9-64-OK
CC: (none) => andrewsfarm

Comment 6 Thomas Andrews 2025-06-16 03:47:51 CEST
Validating.

Keywords: (none) => validated_update
CC: (none) => sysadmin-bugs

Comment 7 Mageia Robot 2025-06-16 19:39:41 CEST
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGAA-2025-0060.html

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.