forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Limit on number of files passed to SLINK?

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
wahorger



Joined: 13 Oct 2014
Posts: 1217
Location: Morrison, CO, USA

PostPosted: Fri Dec 23, 2016 3:37 pm    Post subject: Limit on number of files passed to SLINK? Reply with quote

I just ran into an issue when linking. I added one additional routine, now SLINK will not build the library. Remove ANY object file from the list, and it works well. I may have exceeded either a number of files limit, or a "command line" limit.

The error is:
Code:
Runtime error from program:c:\program files (x86)\silverfrost\ftn95\slink.exe
Access Violation
The instruction at address 0040c0ed attempted to read from location 6464612f

 0040c089 parseCommandLine(<ptr><ptr>char) [+0064]

 0040cb94 main [+00c3]


eax=6464612f   ebx=00004012   ecx=00000100
edx=00100000   esi=0380b7f0   edi=0380b7f0
ebp=0370f8cc   esp=0370f5a8   IOPL=2
ds=002b   es=002b   fs=0053
gs=002b   cs=0023   ss=002b
flgs=00010246 [NC EP ZR SN DN NV]

 0040c0ed  cmpb     [eax],0x3b
 0040c0f0  jne      40c102
 0040c0f6  mov      [ebp-0x2c],0x1


I am adding about 240 object files to the library.

From my make file, the command line is:
Code:

   $(LINKER) /archive:$(LIBRARY_CMASTER) $(addprefix /addobj:,$(CMASTEROBJECTS) $(CFUNCOBJECTS)) /addobj:$(DESTINATION)\KML_CONVERT.obj


For the time being I'll remove the new module and hold off development of that item.

Any help/suggestions on how to work around this would be much appreciated.

Bill

NB: Running V8.05 of FTN95
Back to top
View user's profile Send private message Visit poster's website
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Fri Dec 23, 2016 4:37 pm    Post subject: Reply with quote

Have you tried building the library with SLIM, instead?
Back to top
View user's profile Send private message
wahorger



Joined: 13 Oct 2014
Posts: 1217
Location: Morrison, CO, USA

PostPosted: Fri Dec 23, 2016 4:54 pm    Post subject: Reply with quote

No, I haven't tried SLIM.

I just finished an adjustment to the build about 3 minutes ago.

The build will now not generate an enormously long command line to be processed, and now it has no problem building the library and completing the executables.

Perhaps this points the way!
Bill
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Fri Dec 23, 2016 5:01 pm    Post subject: Reply with quote

From the code for SLINK, it looks like a problem with the command line rather than a limit to the number of files.

I don't have any further information at the moment other than that there may be too many command line arguments.

Is it possible to display the slink command line that the makefile creates?
Back to top
View user's profile Send private message AIM Address
wahorger



Joined: 13 Oct 2014
Posts: 1217
Location: Morrison, CO, USA

PostPosted: Sat Dec 24, 2016 12:28 am    Post subject: Reply with quote

Yes, here is the raw SLINK. About 13K
[code:1:e7cd49e216]SLINK -hardfail /archive:f:\cmasterf95\CHECKMATE\WIN32\C-MASTER.lib /addobj:f:\cmasterf95\CHECKMATE\WIN32\cblock.obj /addobj:f:\cma
sterf95\CHECKMATE\WIN32\CBLOCK_BLOCK_DATA.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32\CBEDS.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32CCATALOG_NEW.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32\CATALOG_INTEGRITY.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32\CCATSORT.obj /add
obj:f:\cmasterf95\CHECKMATE\WIN32\CEDITS.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32\CEXPORT_CSV_NEW.obj /addobj:f:\cmasterf95\CHECKMA
TE\WIN32\CEXTRACT.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32\CIMPORT_F95_NEW.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32\CIMPORT_CSV.ob
j /addobj:f:\cmasterf95\CHECKMATE\WIN32\cblock_init.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32\CLITHO.obj /addobj:f:\cmasterf95\CHECK
MATE\WIN32\CLOG.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32\CLOGPLT_NEWER_NEWER.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32\CMAIN.obj /a
ddobj:f:\cmasterf95\CHECKMATE\WIN32\CMAINT.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32\cphrase_new.obj /addobj:f:\cmasterf95\CHECKMATE
\WIN32\CPROJECT_NEW.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32\CPRTCOD.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32\CKML.obj /addobj:f:cmasterf95\CHECKMATE\WIN32\CQUADBLD.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32\CSEAMBAT.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32\CSE
AMDAT.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32\CSRCBLD.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32\CSTARTUP.obj /addobj:f:\cmasterf95
\CHECKMATE\WIN32\CTRACT.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32\ADDBED.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32\ALASKA.obj /addob
j:f:\cmasterf95\CHECKMATE\WIN32\ANSI_STUBS.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32\ASGNFL.obj /addobj:f:\cmasterf95\CHECKMATE\WIN3
2\BDLOPR.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32\BDLOSP.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32\BDUPPR.obj /addobj:f:\cmasterf95
\CHECKMATE\WIN32\BDUPSP.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32\BEDCOD.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32\BEDCODE_SPECIAL.o
bj /addobj:f:\cmasterf95\CHECKMATE\WIN32\BEDCODE_SPECIALNEW.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32\BEDLIST_EDITING.obj /addobj:f:
\cmasterf95\CHECKMATE\WIN32\BELL.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32\BELLSC.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32\BREGPR.o
bj /addobj:f:\cmasterf95\CHECKMATE\WIN32\BSTAT.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32\CATSEARCH_CREATE_FROM_PROJECT.obj /addobj:f
:\cmasterf95\CHECKMATE\WIN32\CEXIT.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32\CGROUP.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32\CHKBED
.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32\CIMPORT_PULLDOWN.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32\CLEAR.obj /addobj:f:\cmasterf9
5\CHECKMATE\WIN32\CLOGPLOT_SUPPORT.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32\CLONE_SUBPROJECT_LOGS.obj /addobj:f:\cmasterf95\CHECKMA
TE\WIN32\CLONE_SUBPROJECT_PARAMETERS.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32\CLRALL.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32\CLRS
TK.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32\CNTYPR.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32\CODENG.obj /addobj:f:\cmasterf95\CHECK
MATE\WIN32\CODINT.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32\COMPFUNC.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32\COMPLITH.obj /addobj:
f:\cmasterf95\CHECKMATE\WIN32\COMPPR.obj /addobj:f:\cmasterf95\CHECKMATE\WIN32\CONV
Back to top
View user's profile Send private message Visit poster's website
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Sat Dec 24, 2016 12:30 am    Post subject: Reply with quote

Would it work to have the makefile build up an Slink script file and then call Slink with the name of the script file as the only argument? Something along the lines of
...
<TAB>echo $@ >> files.lst
...
<TAB>slink files.lst
Back to top
View user's profile Send private message
wahorger



Joined: 13 Oct 2014
Posts: 1217
Location: Morrison, CO, USA

PostPosted: Sat Dec 24, 2016 12:38 am    Post subject: Reply with quote

Perhaps that would work.

The easier way was to store all the object files that are on the command line and place them into a special folder when they get compiled. Then, point SLINK to the folder using /addobj:new_folder\*.obj.

Much easier to "fix" it this way.
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Sat Dec 24, 2016 8:07 am    Post subject: Reply with quote

If you were able to change directory (cd) to f:\cmasterf95\CHECKMATE\WIN32 and run SLINK from there, then you would only need the short file names.

At the moment I am assuming that there is some system limit on the size of a command.
Back to top
View user's profile Send private message AIM Address
wahorger



Joined: 13 Oct 2014
Posts: 1217
Location: Morrison, CO, USA

PostPosted: Sat Dec 24, 2016 3:45 pm    Post subject: Reply with quote

I am using a separate folder for the large number of object files that are compiled from one of my source folders, then using a wildcard to /addobj: them in.

So the problem is bypassed, and actually, the MAKEFILE is cleaner now!

Thanks for taking a look.
Bill
Back to top
View user's profile Send private message Visit poster's website
wahorger



Joined: 13 Oct 2014
Posts: 1217
Location: Morrison, CO, USA

PostPosted: Tue Dec 27, 2016 6:30 am    Post subject: Reply with quote

The command line limit for windows 10 is (apparently) 32767 characters. I cannot find a specific MS reference to this. The only number I can find is 8191 (windows 7).

Anyone know what the limit actually is?
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group