My compile script has not changed in weeks with the single addition of '-static' to the compile call. Removing the '-static' from the call makes no difference.
The output file name is deleted just prior to the compile.
Testing with single program source files and source programs with multiple functions within matters not - all bomb out like this.
Any ideas accepted ...
Gregory
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Gregory, it appears that the output file is app-libs.dll and you are also telling the linker "ld" to load that file as input as well.
The error "file not recognized: File truncated" when using GCC and LD on Windows 10 typically indicates an issue with file integrity or how the compiler and linker are handling output files. This error can arise from several scenarios:
1. Input and Output File Conflicts:
ps.. can you confirm if this is actually the issue ? it appears the command line shows the output file and the input to the linker being the same file.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
the build that Arnold has is GNUCOBOL 3.2 the release version. The version which you downloaded from my link is built from the current source plus some of my most recent additions. There were also many changes done to GNUCOBOL since the 3.2 release. So I am not sure if the more recent GCC compiler was the cause of the resolution or changes to GNUCOBOL itself.
In any event, since the issue is resolved, perhaps we should continue on the path of improving the latest build of GNUCOBOL, just my personal opinion.
Chuck Haatvedt
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In any case: all of the C compiler, assembler and linker are much newer in the MSYS2 (Chuck's build).
I guess that if you download the old GC3.2 MSYS2 builds from Arnold's site they work as well, don't they?
I appreciate the comments and suggestions. Since I switched to Chuck's Windoze package the issue no longer presents so all is well.
The cause of my initial consternation is this: when compiling Arnold's version on Thursday all was working well. I have been using this compiler for weeks. On Friday afternoon the errors started. The only change was the addition of a new '.dll' (app-libs.dll) to the project. The new library compiles clean; no compiler complaints. All of this using Arnold's package. Very strange ...
Thanks again, y'all.
Gregory
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
As Chuck and Simon quickly noticed this compile was creating 'app-libs.dll' while trying to link the same file. This fails using Arnold's package (msys32?) but works with Chuck's (msys64). The same file 'in' and 'out' conflict must have been corrected in msys64.
Interestingly I have not run into this scenario under Linux where my big project has about 70 '.so' libraries which are all referenced in my standard Makefile recipes.
Anyway, good work guys!
Gregory
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Literally out of the blue I start getting error messages from 'gcc' (Arnold's Windows package) to wit:
My compile script has not changed in weeks with the single addition of '-static' to the compile call. Removing the '-static' from the call makes no difference.
The output file name is deleted just prior to the compile.
Testing with single program source files and source programs with multiple functions within matters not - all bomb out like this.
Any ideas accepted ...
Gregory
On 13/10/2025 14:01, Gregory A Failing wrote:
If so take a look at what was.
|
No updates to system nor Arnold's package. Obviously changes to Cobol
source code are being made.
G
-----Original Message-----
From: discussion@gnucobol.p.re.sourceforge.net
discussion@gnucobol.p.re.sourceforge.net On Behalf Of Vincent (Bryan) Coen
Sent: Monday, October 13, 2025 8:29 AM
To: [gnucobol:discussion] cobol@discussion.gnucobol.p.re.sourceforge.net
Subject: [gnucobol:discussion] Re: 'ld' file truncation
On 13/10/2025 14:01, Gregory A Failing wrote:
If so take a look at what was.
|
'ld' file
truncation
Sent from sourceforge.net because you indicated interest in
https://sourceforge.net/p/gnucobol/discussion/cobol/
To unsubscribe from further messages, please visit
https://sourceforge.net/auth/subscriptions/
Gregory, it appears that the output file is app-libs.dll and you are also telling the linker "ld" to load that file as input as well.
The error "file not recognized: File truncated" when using GCC and LD on Windows 10 typically indicates an issue with file integrity or how the compiler and linker are handling output files. This error can arise from several scenarios:
1. Input and Output File Conflicts:
ps.. can you confirm if this is actually the issue ? it appears the command line shows the output file and the input to the linker being the same file.
I can confirm this with his given outputs :-)
The one that raised an error has
most likely executed in that directory.
The output of the new one is a -x run, creating an executable.
In this case there's just an -l too much when building the app-libs.dll in the first place.
OK ... an interesting development ... when I switch over to Chuck's Windows package the issue disappears.
Text program looks good - user library looks good (all sub functions referenced in the '.dll').
I guess the newer version of the compiler is the reason.
If anyone wants some diagnostic work done on Arnold's package today, I will have the time.
Gregory
Gregory,
the build that Arnold has is GNUCOBOL 3.2 the release version. The version which you downloaded from my link is built from the current source plus some of my most recent additions. There were also many changes done to GNUCOBOL since the 3.2 release. So I am not sure if the more recent GCC compiler was the cause of the resolution or changes to GNUCOBOL itself.
In any event, since the issue is resolved, perhaps we should continue on the path of improving the latest build of GNUCOBOL, just my personal opinion.
Is that a 32 or 64 bit built? Arnold's is 32.
In any case: all of the C compiler, assembler and linker are much newer in the MSYS2 (Chuck's build).
I guess that if you download the old GC3.2 MSYS2 builds from Arnold's site they work as well, don't they?
What about the MinGW nightly?
I appreciate the comments and suggestions. Since I switched to Chuck's Windoze package the issue no longer presents so all is well.
The cause of my initial consternation is this: when compiling Arnold's version on Thursday all was working well. I have been using this compiler for weeks. On Friday afternoon the errors started. The only change was the addition of a new '.dll' (app-libs.dll) to the project. The new library compiles clean; no compiler complaints. All of this using Arnold's package. Very strange ...
Thanks again, y'all.
Gregory
A-HA! The geniuses at the helm of GC have come thru again. Using Chuck's package I compile 'app-libs' and the following shows:
As Chuck and Simon quickly noticed this compile was creating 'app-libs.dll' while trying to link the same file. This fails using Arnold's package (msys32?) but works with Chuck's (msys64). The same file 'in' and 'out' conflict must have been corrected in msys64.
Interestingly I have not run into this scenario under Linux where my big project has about 70 '.so' libraries which are all referenced in my standard Makefile recipes.
Anyway, good work guys!
Gregory