Old 13th May 2004, 14:27   #1
ovidiu
Junior Member
 
Join Date: Apr 2004
Location: Singapore
Posts: 12
NSIS compile error

I'm getting the following error while trying to compile NSIS.
Anyone can tell me which library am i missing ?

Ui.obj : error LNK2001: unresolved external symbol __aullshr
Release-bzip2/exehead_bzip2.exe : fatal error LNK1120: 1 unresolved externals
ovidiu is offline   Reply With Quote
Old 15th May 2004, 10:59   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Which compiler?

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 4th June 2004, 22:34   #3
lroathe
Junior Member
 
Join Date: Feb 2004
Posts: 12
Re: NSIS compile error

Quote:
Originally posted by ovidiu
I'm getting the following error while trying to compile NSIS.
Anyone can tell me which library am i missing ?

Ui.obj : error LNK2001: unresolved external symbol __aullshr
Release-bzip2/exehead_bzip2.exe : fatal error LNK1120: 1 unresolved externals

I am also seeing this error, and have been unable to find any reference to aullshr in the windows docs or headers.

I am using MSVS (vc) 6.0 with the latest service pack.
lroathe is offline   Reply With Quote
Old 5th June 2004, 01:37   #4
iceman_k
NSIS Dev
 
iceman_k's Avatar
 
Join Date: Feb 2003
Location: Boston, MA, U.S.A.
Posts: 455
Make sure that you also have the latest Platform SDK downloaded.
Then register the PSDK directories with Visual Studio using the shortcuts installed with the PSDK.
Then try compiling again.
Maybe it will fix the problem.

Cheers,
Iceman_K

EclipseNSIS - An NSIS IDE for the Eclipse Platform | My contributions to the wiki
iceman_k is offline   Reply With Quote
Old 5th June 2004, 02:40   #5
lroathe
Junior Member
 
Join Date: Feb 2004
Posts: 12
Quote:
Originally posted by iceman_k
Make sure that you also have the latest Platform SDK downloaded.
Then register the PSDK directories with Visual Studio using the shortcuts installed with the PSDK.
Then try compiling again.
Maybe it will fix the problem.
Unfortunately I had already done that. Does NSIS require .net?
lroathe is offline   Reply With Quote
Old 5th June 2004, 03:00   #6
iceman_k
NSIS Dev
 
iceman_k's Avatar
 
Join Date: Feb 2003
Location: Boston, MA, U.S.A.
Posts: 455
Not that I know of.
I just tried compiling and it worked fine. I assume you are using the latest CVS version?

Cheers,
Iceman_K

EclipseNSIS - An NSIS IDE for the Eclipse Platform | My contributions to the wiki
iceman_k is offline   Reply With Quote
Old 5th June 2004, 03:06   #7
lroathe
Junior Member
 
Join Date: Feb 2004
Posts: 12
Trying to compile the latest from CVS, just checked it out this afternoon. The aullshr reference is in gui.c if that helps.

Actually, the only reason I want to compile is to modify the error message reported for "Corrupt Installation Detected" -- many of my users get this when downloading our products (they range from 25MB to 105MB in size) and it would be good if that message indicated it was probably a download problem and give a suggestion on how to solve it.

Can I otherwise modify this string?
lroathe is offline   Reply With Quote
Old 5th June 2004, 08:49   #8
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
__aullshr is probably VC6 SP6's function that performs shift right operations on unsigned long long variables. No idea what the 'a' is for

Try replacing Ui.c line 907:
code:
available = (int)(available64.QuadPart >> 10);
with:
code:
available = (int)(Int64ShrlMod32(available64.QuadPart, 10));

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 5th June 2004, 16:16   #9
lroathe
Junior Member
 
Join Date: Feb 2004
Posts: 12
Quote:
Originally posted by kichik
__aullshr is probably VC6 SP6's function that performs shift right operations on unsigned long long variables. No idea what the 'a' is for

Try replacing Ui.c line 907:
code:
available = (int)(available64.QuadPart >> 10);
with:
code:
available = (int)(Int64ShrlMod32(available64.QuadPart, 10));
That was exactly the problem, and I can now compile and link all targets! Now, why the frick does my copy of VC6 SP6 generate a call to that function, but is then not able to link in that function? Could it be that there is a way to setup VC6 with long-long support libraries as an option?

Anyway, thanks for the help!

PS: my guess at the function name is "arithmatic unsigned long long shift right"
lroathe is offline   Reply With Quote
Old 5th June 2004, 17:32   #10
iceman_k
NSIS Dev
 
iceman_k's Avatar
 
Join Date: Feb 2003
Location: Boston, MA, U.S.A.
Posts: 455
Alternately, you can extract ullshr.obj from libc:
code:

lib /extract:build\intel\st_obj\ullshr.obj libc.lib



and link it in the project.

Cheers,
Iceman_K

EclipseNSIS - An NSIS IDE for the Eclipse Platform | My contributions to the wiki
iceman_k is offline   Reply With Quote
Old 2nd July 2004, 15:33   #11
iceman_k
NSIS Dev
 
iceman_k's Avatar
 
Join Date: Feb 2003
Location: Boston, MA, U.S.A.
Posts: 455
Quote:
Originally posted by kichik
__aullshr is probably VC6 SP6's function that performs shift right operations on unsigned long long variables. No idea what the 'a' is for

Try replacing Ui.c line 907:
code:
available = (int)(available64.QuadPart >> 10);
with:
code:
available = (int)(Int64ShrlMod32(available64.QuadPart, 10));
Any plans of making this change in the CVS source?

Cheers,
Iceman_K

EclipseNSIS - An NSIS IDE for the Eclipse Platform | My contributions to the wiki
iceman_k is offline   Reply With Quote
Old 2nd July 2004, 21:06   #12
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
No. It produces larger code. A better solution must be found.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 3rd July 2004, 02:09   #13
iceman_k
NSIS Dev
 
iceman_k's Avatar
 
Join Date: Feb 2003
Location: Boston, MA, U.S.A.
Posts: 455
Is this of any use to you?
ullshr.asm

Cheers,
Iceman_K

EclipseNSIS - An NSIS IDE for the Eclipse Platform | My contributions to the wiki
iceman_k is offline   Reply With Quote
Old 3rd July 2004, 12:38   #14
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Hmm... Visual C++ Introductory Edition? I assume you meant to link to an implementation of ullshr. I prefer not to get assembler in yet. Extracting __aullshr as an .obj file and linking to it so SP6 can find does seem like a possible solution. I would, of course, prefer a code change solution that will both work on SP6 and SP5 and not increase code size.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 3rd July 2004, 18:54   #15
iceman_k
NSIS Dev
 
iceman_k's Avatar
 
Join Date: Feb 2003
Location: Boston, MA, U.S.A.
Posts: 455
Oops!
Certainly didn't mean to imply that you needed an intro to VC++.
Here is the correct link:
ullshr.asm

But, yes, it is assembly.
So, perhaps not the right solution for now.

Cheers,
Iceman_K

EclipseNSIS - An NSIS IDE for the Eclipse Platform | My contributions to the wiki
iceman_k is offline   Reply With Quote
Old 3rd July 2004, 19:32   #16
RDaneel
Member
 
Join Date: Nov 2001
Location: Seattle, Washington
Posts: 78
Hmmm... going along with kichik, let's not be too hasty here.

I built from CVS on June 3 (because of the NT4 installer problem with GetDiskFreeSpaceEx), and this chunk of code dealing with the 64-bit right-shift is right there in the sources... and *I* used a vc6 SP6 system to do it.

BUT, I am still using the code generator (c2.dll) from the "Processor Pack" for SP5... and possibly because of the newer ["vc7"] compiler piece, all I see is inline code generated for the code sequence in question:
Quote:
mov eax, DWORD PTR _available64$93998[ebp]
mov ecx, DWORD PTR _available64$93998[ebp+4]
shrd eax, ecx, 10
shr ecx, 10 ; 0000000aH
This is with the NSIS-standard optimization setting of "Minimize Size", BTW. However, I do specify the "Pentium Pro" (/G6) code generation option, since that more accurately reflects the in-use processor architectures one is like ly to see these days.

So, since as I recall, kichik uses the Processor Pack, this could explain why only some people are seeing this linking issue - the people who are not using the Processor Pack.

As to *why* the linking problem exists, it is not really clear to me - the "ullshr.asm" file has been part of the CRT sources for a long time - take a look in ..\CRT\SRC\Intel.

As for vc6 SP6 + the SP5 Processor Pack, I have been using this combination since SP6 came out with no difficulty. Besides not seeing any trouble myself, I might point out that SP6 does NOT include a new version of c2.dll, so the possibility of incompatible changes to the intermediate representation from the compiler's earlier passes is small.
RDaneel is offline   Reply With Quote
Old 3rd July 2004, 21:22   #17
iceman_k
NSIS Dev
 
iceman_k's Avatar
 
Join Date: Feb 2003
Location: Boston, MA, U.S.A.
Posts: 455
Hmmm... I didn't try VS6 SP6 + SP5 processor pack.
Let me try that and see.

Cheers,
Iceman_K

EclipseNSIS - An NSIS IDE for the Eclipse Platform | My contributions to the wiki
iceman_k is offline   Reply With Quote
Old 3rd July 2004, 21:45   #18
RDaneel
Member
 
Join Date: Nov 2001
Location: Seattle, Washington
Posts: 78
If you have any trouble doing this... SP6 *will* attempt to remove/disable the Processor Pack.

I took care of this by saving the contents of the appropriate "Bin" directory first, and then restoring any of the c2.dll / MASM support files I needed to after the SP6 update was done.

One could take this approach, or if the "damage" has already been done, using 7-Zip or WinZip to pull the relevant files straight out of the SP5 Processor Pack installer would probably be fine too.

Note that this all works fine if one just wants the superior code generator from the Processor Pack... if you want to actually use the processor Pack as MS intended (to have compiler support for the MMX/SSE etc H/W), there may be a little more environment needed to restore - see the .reg files in the PP installer, for example.
RDaneel is offline   Reply With Quote
Old 7th July 2004, 17:01   #19
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Quote:
Originally posted by RDaneel
As to *why* the linking problem exists, it is not really clear to me - the "ullshr.asm" file has been part of the CRT sources for a long time - take a look in ..\CRT\SRC\Intel.
We don't use CRT

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 1st October 2004, 00:47   #20
bluenet
Senior Member
 
Join Date: Mar 2004
Posts: 138
I got another error: NSIS\Source\DialogTemplate.cpp(353) : error C2065: 'DS_SHELLFONT' : undeclared identifier
What wrong for me? Compiler is VC++ 6 with SP6
I find it define in exehead\resource.h

I try to add

PHP Code:
#ifndef DS_SHELLFONT
#define DS_SHELLFONT        (DS_SETFONT | DS_FIXEDSYS)
#endif 
to DialogTemplate.h it compile OK.

Last edited by bluenet; 1st October 2004 at 01:04.
bluenet is offline   Reply With Quote
Old 1st October 2004, 09:46   #21
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Fixed, thanks.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 16th September 2005, 16:27   #22
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
I've added a check to the SConscript to check for this specific case and use Int64ShrlMod32 instead. Building using SP6 should no longer require manual intervention.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 17th March 2010, 09:17   #23
Wizou
Senior Member
 
Join Date: Aug 2007
Location: Paris, France
Posts: 304
I have a problem building NSIS with MSVC 2005 tools:
Quote:
as /coff -o build\debug\System\Source\Call.obj Contrib\System\Source\Call.S
'as' was not found.
After some investigation, I think the problem is that SCons should use masm.py configuration in order to use the ml.exe MASM compiler that comes with MSVC, instead of as.exe (from MingW?)

But I don't know how to tell SCons to do that..
Wizou is offline   Reply With Quote
Old 22nd March 2010, 13:33   #24
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Are you sure ml.exe is in the PATH? At least on VC6 it required a separate installation of the Processor Pack, iirc.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 23rd March 2010, 08:10   #25
Wizou
Senior Member
 
Join Date: Aug 2007
Location: Paris, France
Posts: 304
thanks! after adding MSVC dir to the PATH, it worked
Wizou is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump