Forum > Other
FreeBSD 13.1 cprt0.o error
d.ioannidis:
Hi,
I can't build / compile any project for FreeBSD box 13.1-RELEASE-p3(64-bit).
The error I'm getting is :
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---cprt0.o: .note.GNU-stack section implies executable stack
( see attached img )
Free Pascal ( 3.2.2 ) / Lazarus ( 2.2.4 ) installed using pkg.
Any hint ?
regards,
Fred vS:
Hello d.ioannidis.
Did you try to run applications compiled with FreeBSD 11 on your FreeBSD 13 machine?
For example, does this application run on your system? (just unzip and run "StrumPract" ) : https://github.com/fredvs/strumpract/releases/download/3.4.0/StrumPract_3_4_0_freebsd_amd64.zip
It was compiled with fpc 3.2.2. for FreeBSD 64 on a FreeBSD 11 system.
Thanks.
Fre;D
sketch:
FreeBSD uses ld.lld which is as drop-in replacement for GNU binutils BFD and gold linkers. But your error message shows ld.BFD which seems like it is using GNU binutils. I don't know why the FreeBSD linker would report BFD just because it's a drop-in replacement. And since it is in /usr/local/bin makes it seem it is using GNU binutils. Otherwise, it would be in /usr/bin.
Anyway, the release of GNU binutils 2.39 added several new warnings to the linker.
--- Quote ---Since binutils 2.39, ld will print a warning if any stack section is
executable, which is the default for stack sections on files without a
.note.GNU-stack section.
--- End quote ---
The warning
--- Quote ---warning: cprt0.o: missing .note.GNU-stack section implies executable stack
--- End quote ---
is letting you know the program is being given an executable stack. Warning messages about the creation of an executable stack can be disabled with --no-warn-execstack and warnings about executable segments can be disabled --no-warn-rwx-segments.
Also check if you are using the GNU linker or the FreeBSD linker.
d.ioannidis:
Hi,
@sketch
@Fred vS
apologies for my wrong post. I'm not familiar with BSD's.
Actually, I can build and run programs just fine . I was misled by the log message while linking which started with "Error:" and the fact that I was testing FreeBSD and FPC in a slow VM ...
Sorry again for the noise ...
regards,
Fred vS:
--- Quote from: d.ioannidis on January 17, 2023, 07:27:40 pm ---Hi,
@sketch
@Fred vS
apologies for my wrong post. I'm not familiar with BSD's.
Actually, I can build and run programs just fine . I was misled by the log message while linking which started with "Error:" and the fact that I was testing FreeBSD and FPC in a slow VM ...
Sorry again for the noise ...
regards,
--- End quote ---
Ha, nice you make it work.
Also me sorry for the noise, I just tried the application compiled on FreeBSD 11 and fpc 3.2.2 on a FreeBSD 13 machine and it works out-of-the-box.
By the way, if you are new to FreeBSD, you may consider to try GhostBSD, it has all needed for a nice desktop machine and install is very easy:
https://ghostbsd.org/download
But maybe you want use FreeBSD only for console apps like server, if so, also sorry for that noise.
Navigation
[0] Message Index
[#] Next page