ld: warning future deprecation

Linux specific questions.
Post Reply
exagonx
Posts: 336
Joined: Mar 20, 2009 17:03
Location: Italy
Contact:

ld: warning future deprecation

Post by exagonx »

Hello friends, I wanted to bring to your attention that in version 12 of Linux Debian once the FreeBASIC compiler and all its components are installed, this when compiling a file releases a warning of future deprecation, the executables continue to work correctly, you just have to be careful with the updates.

Code: Select all

exagonx@PIIDebian:/PIISVR/test$ fbc hello.bas
ld: warning: hello.o: missing .note.GNU-stack section implies executable stack
ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
Dinosaur
Posts: 1507
Joined: Jul 24, 2005 1:13
Location: Hervey Bay (.au)

Re: ld: warning future deprecation

Post by Dinosaur »

Hi All

Can you show us your Compiling / Linking options ?

I am using Debian 12 and not getting this warning.

Regards
exagonx
Posts: 336
Joined: Mar 20, 2009 17:03
Location: Italy
Contact:

Re: ld: warning future deprecation

Post by exagonx »

Dinosaur wrote: Jan 08, 2025 6:26 Hi All

Can you show us your Compiling / Linking options ?
Hi, I'm not using any option I just typed "FBC HELLO.BAS" and from the post, that's the screen that comes out.
Ah FBC version 1.10.1, in 1.10.0 nothing appeared
Dinosaur
Posts: 1507
Joined: Jul 24, 2005 1:13
Location: Hervey Bay (.au)

Re: ld: warning future deprecation

Post by Dinosaur »

Hi All

If I change to the folder examples and type fbc hello.bas, there is no display output and the executable file hello is created.
Runs correctly.

If I add -v to the line, Iget:
FreeBASIC Compiler - Version 1.10.1 (2023-12-24), built for linux-x86_64 (64bit)
Copyright (C) 2004-2023 The FreeBASIC development team.
target: linux-x86_64, x86-64, 64bit
backend: gcc
compiling: hello.bas -o hello.c (main module)
compiling C: gcc -m64 -march=x86-64 -S -nostdlib -nostdinc -Wall -Wno-unused -Wno-main -Werror-implicit-function-declaration -O0 -fno-strict-aliasing -frounding-math -fno-math-errno -fwrapv -fno-exceptions -fno-asynchronous-unwind-tables -funwind-tables -Wno-format -masm=intel "hello.c" -o "hello.asm"
assembling: as --64 --strip-local-absolute "hello.asm" -o "hello.o"
linking: ld -m elf_x86_64 -o "hello" -dynamic-linker /lib64/ld-linux-x86-64.so.2 -T "/usr/local/bin/../lib/freebasic/linux-x86_64/fbextra.x" -L "/usr/local/bin/../lib/freebasic/linux-x86_64" -L "." -L "/usr/lib/gcc/x86_64-linux-gnu/12" "/usr/lib/gcc/x86_64-linux-gnu/12/../../../x86_64-linux-gnu/crt1.o" "/usr/lib/gcc/x86_64-linux-gnu/12/../../../x86_64-linux-gnu/crti.o" "/usr/lib/gcc/x86_64-linux-gnu/12/crtbegin.o" "/usr/local/bin/../lib/freebasic/linux-x86_64/fbrt0.o" "hello.o" "-(" -lfb -ltinfo -lm -ldl -lpthread -lgcc -lgcc_eh -lc "-)" "/usr/lib/gcc/x86_64-linux-gnu/12/crtend.o" "/usr/lib/gcc/x86_64-linux-gnu/12/../../../x86_64-linux-gnu/crtn.o" --eh-frame-hdr
Still no Warning message.??

Regards
srvaldez
Posts: 3557
Joined: Sep 25, 2005 21:54

Re: ld: warning future deprecation

Post by srvaldez »

Hi exagonx
it would help if you would give the binutils version, e.g. ld --version because a lot of distros don't use the latest tools available
Dinosaur
Posts: 1507
Joined: Jul 24, 2005 1:13
Location: Hervey Bay (.au)

Re: ld: warning future deprecation

Post by Dinosaur »

Hi All

2.40 for me.

Regards
srvaldez
Posts: 3557
Joined: Sep 25, 2005 21:54

Re: ld: warning future deprecation

Post by srvaldez »

I just fired-up my Kali VM, it has the latest binutils version 2.43
compiling a FB program doesn't give any warnings
exagonx
Posts: 336
Joined: Mar 20, 2009 17:03
Location: Italy
Contact:

Re: ld: warning future deprecation

Post by exagonx »

srvaldez wrote: Jan 08, 2025 10:02 Hi exagonx
it would help if you would give the binutils version, e.g. ld --version because a lot of distros don't use the latest tools available
Thank you for your suggestion
This is my version 2.40
exagonx@hotmail.com@PIIDebian:~$ ld --version
GNU ld (GNU Binutils for Debian) 2.40
Copyright (C) 2023 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
exagonx@hotmail.com@PIIDebian:~/Documents$ mkdir freebasic
exagonx@hotmail.com@PIIDebian:~/Documents$ cd freebasic
exagonx@hotmail.com@PIIDebian:~/Documents/freebasic$ nano hello.bas

Code: Select all

print "Hello"
exagonx@hotmail.com@PIIDebian:~/Documents/freebasic$ fbc hello.bas
ld: warning: hello.o: missing .note.GNU-stack section implies executable stack
ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
srvaldez
Posts: 3557
Joined: Sep 25, 2005 21:54

Re: ld: warning future deprecation

Post by srvaldez »

exagonx, what if you update FreeBasic ?
I suspect that you may be using an older version
exagonx
Posts: 336
Joined: Mar 20, 2009 17:03
Location: Italy
Contact:

Re: ld: warning future deprecation

Post by exagonx »

srvaldez wrote: Jan 08, 2025 12:55 exagonx, what if you update FreeBasic ?
I suspect that you may be using an older version
exagonx@hotmail.com@PIIDebian:~/Documents/freebasic$ fbc --version
FreeBASIC Compiler - Version 1.10.1 (2023-12-24), built for linux-x86 (32bit)
Copyright (C) 2004-2023 The FreeBASIC development team.
srvaldez
Posts: 3557
Joined: Sep 25, 2005 21:54

Re: ld: warning future deprecation

Post by srvaldez »

exagonx
I just installed Debian on a VM, binutils 2.40 and FB-1.20.0, no warning
fbc -w all -v "hello.bas" (in directory: /root/Documents)
FreeBASIC Compiler - Version 1.20.0 (2024-07-25), built for linux-x86_64 (64bit)
Copyright (C) 2004-2024 The FreeBASIC development team.
target: linux-x86_64, x86-64, 64bit
backend: gcc
compiling: hello.bas -o hello.c (main module)
compiling C: gcc -m64 -march=x86-64 -S -nostdlib -nostdinc -Wall -Wno-unused -Wno-main -Werror-implicit-function-declaration -O0 -fno-strict-aliasing -frounding-math -fno-math-errno -fwrapv -fno-exceptions -fno-asynchronous-unwind-tables -funwind-tables -Wno-format -masm=intel "hello.c" -o "hello.asm"
assembling: as --64 --strip-local-absolute "hello.asm" -o "hello.o"
linking: ld -m elf_x86_64 -o "hello" -dynamic-linker /lib64/ld-linux-x86-64.so.2 -T "/usr/local/bin/../lib/freebasic/linux-x86_64/fbextra.x" -L "/usr/local/bin/../lib/freebasic/linux-x86_64" -L "." -L "/usr/lib/gcc/x86_64-linux-gnu/12" "/usr/lib/gcc/x86_64-linux-gnu/12/../../../x86_64-linux-gnu/crt1.o" "/usr/lib/gcc/x86_64-linux-gnu/12/../../../x86_64-linux-gnu/crti.o" "/usr/lib/gcc/x86_64-linux-gnu/12/crtbegin.o" "/usr/local/bin/../lib/freebasic/linux-x86_64/fbrt0.o" "hello.o" "-(" -lfb -ltinfo -lm -ldl -lpthread -lgcc -lgcc_eh -lc "-)" "/usr/lib/gcc/x86_64-linux-gnu/12/crtend.o" "/usr/lib/gcc/x86_64-linux-gnu/12/../../../x86_64-linux-gnu/crtn.o" --eh-frame-hdr
Compilation finished successfully.
I suggest that you build FB-1.20.0 from source and update your FB installation
<edit> why 32-bit and not 64-bit ?
marcov
Posts: 3497
Joined: Jun 16, 2005 9:45
Location: Netherlands
Contact:

Re: ld: warning future deprecation

Post by marcov »

(32-bit is perhaps native backend instead of cgen ?)
exagonx
Posts: 336
Joined: Mar 20, 2009 17:03
Location: Italy
Contact:

Re: ld: warning future deprecation

Post by exagonx »

srvaldez wrote: Jan 08, 2025 15:29 exagonx
I just installed Debian on a VM, binutils 2.40 and FB-1.20.0, no warning

I suggest that you build FB-1.20.0 from source and update your FB installation
<edit>
Ill do it
why 32-bit and not 64-bit ?
Because is a Pentium II 266Mhz ;P

it is a machine for writing and developing performance-optimized code, having little RAM, an old CPU with obsolete architecture I can time the performance and write fast and stable optimized code

CPU - Intel Pentium II 266Mhz
RAM - 384 MB SDRAM 100Mhz
VGA - Intel 740 AGP + Voodoo 3dfx
LAN - Realtek 8132 10/100
SPK - Sound Blaster Awe 64
HDD - 2 x 40GB EIDE Quantum Fireball
HDD - Controller Sil3114 + HDD 1TB SATA3 + HDD 500GB SATA 2
USB - Controller Nek USB 2.0 4 + 1
OS - Linux Debian 12 i386
OS - Windows XP
OS - Windows 98
OS - MSDOS 6.22 + Windows 3.11 Workgroup
jakobssystems
Posts: 37
Joined: Aug 11, 2024 8:06

Re: ld: warning future deprecation

Post by jakobssystems »

you may laugh, but 2021 I've kicked out the last remaining NT4 Workstation :-P
https://blog.jakobs.systems/img/2021112 ... -nt-4.webp
exagonx
Posts: 336
Joined: Mar 20, 2009 17:03
Location: Italy
Contact:

Re: ld: warning future deprecation

Post by exagonx »

jakobssystems wrote: Jan 14, 2025 9:05 you may laugh, but 2021 I've kicked out the last remaining NT4 Workstation :-P
https://blog.jakobs.systems/img/2021112 ... -nt-4.webp
Yes they are nice but I only have Windows 2000 Professional, and having to decide whether to install win2k or winxp I preferred xp for better compatibility with some applications, currently I'm trying to use the freebasic screen 14 graphics mode in a minimal version of Linux without having to depend on the X Window libraries
Post Reply