Re: RE : Link problems with V2.2.8

2004-06-17 Thread Leo Klein
Thank you for your reply on Tuesday, but installing the CRTL patch (V4 
for Alpha VMS V7.2.1) hasn't solved my link problems, and the same two 
symbols are still undefined.

I've rebooted after installing the patch and its many and voluminous 
dependencies (CLIUTL, FIBRE_SCSI, LAN, MOUNT96, PCSI, SYS and UPDATE), 
yet have made no progress with Samba.

I'm not discouraged yet - Samba is too appealing an alternative to ftp - 
and would welcome any other suggestion.

COLLOT Jean-Yves wrote:
No, you can't ignore those link messages. Samba won't work.
Please download from HP and install the latest available CRTL patch kit for
your VMS version, and it should be OK to link and run Samba.
JY
-Message d'origine-
De : Leo Klein [mailto:[EMAIL PROTECTED] 
Envoyé : mardi 15 juin 2004 12:26
À : [EMAIL PROTECTED]
Objet : Link problems with V2.2.8

I'm having a problem linking version 2.2.8: there are many messages 
about two undefined symbols. I don't suppose I can ignore them and go 
ahead with the produced .exe files as though all is well.

I'm using two files downloaded yesterday from 
http://www.pi-net.dyndns.org/anonymous/jyc/ and dated 10-May-2004; they 
are samba-2_2_8-src.zip and samba-2_2_8-obj.zip. I don't have the Dec C 
compiler.

$ @link
Linking SMBD
%LINK-W-NUDFSYMS, 2 undefined symbols:
%LINK-I-UDFSYM, DECC$GXSNPRINTF
%LINK-I-UDFSYM, DECC$GXVSNPRINTF
%LINK-W-USEUNDEF, undefined symbol DECC$GXSNPRINTF referenced
 in psect $LINK$ offset %X06A0
 in module SERVER file DKB400:[SAMBA228.SOURCE.SMBD]SERVER.OBJ;2
%LINK-W-USEUNDEF, undefined symbol DECC$GXVSNPRINTF referenced
 in psect $LINK$ offset %X00A0
 in module DEBUG file DKB400:[SAMBA228.SOURCE.BIN]SAMBA.OLB;3
and so on.
There was a similar problem with a different PRINTF symbol in September 
2002, and Jean-Yves fixed it.

PLEASE READ THIS IMPORTANT ETIQUETTE MESSAGE BEFORE POSTING:
http://www.catb.org/~esr/faqs/smart-questions.html
PLEASE READ THIS IMPORTANT ETIQUETTE MESSAGE BEFORE POSTING:
http://www.catb.org/~esr/faqs/smart-questions.html

PLEASE READ THIS IMPORTANT ETIQUETTE MESSAGE BEFORE POSTING:
http://www.catb.org/~esr/faqs/smart-questions.html


Re: RE : Link problems with V2.2.8

2004-06-17 Thread John E. Malmberg
Leo Klein wrote:

$ @link
Linking SMBD
%LINK-W-NUDFSYMS, 2 undefined symbols:
%LINK-I-UDFSYM, DECC$GXSNPRINTF
%LINK-I-UDFSYM, DECC$GXVSNPRINTF
Several of the newer xxxSNPRINTF variants are not in the older CRTL and 
are being added to the newer versions.

For older CRTLs, you must supply replacement routines.
When supplying the replacement routine for a standard C library, it must 
not have the same public symbol name as the routines, as this will cause 
problems.

Some of these problems will be visible at link time, some will not, and 
may take quite a bit of effort to find why the code is malfunctioning.

The GXSNPRINTF and GXVSNPRINTF calls can be generated by the compiler 
for a variety of public C RTL routines depending on your optimization 
settings, so you have to look at the source modules.

It should not be hard to write replacement routines, and likely they are 
already present in the SAMBA code, and a change to config.h will make 
them active.

For example, a missing VSNPRINTF routine would be replaced with a 
routine named rep_vsnprintf, or samba_vsnprintf, or my_vsnprintf.

In the config.h there would be an option:
#define HAVE_VSNPRINTF
or
#undef HAVE_VSNPRINTF
Depending on if your platform supports that call.
In one of the header files, or in the modules that use vsnprintf(), 
there would be the following conditional code, or something similar.

#ifndef HAVE_VSNPRINTF
#define vsnprinf samba_vsnprinf
#endif
If you need to supply your own replacement routine, then the above 
conditional code would be put in the CONFIG.H file to minimize edits to 
the common UNIX SAMBA code.

And even though it seems to be an easy thing to do, do not ever name the 
replacement routine the same as a standard C library function.

A good optimizing C complier knows about many of the library routines 
and will in line them, so if you are trying to change the behavior of a 
standard function, the compiler may not realize that, and inline the 
standard function.

Also the link time substitution of user supplied routines covering up 
system libraries only works reliably on platforms that do not use shared 
images for their libraries.

People who do not heed the above warning usually end up with others that 
try to build their code posting on comp.os.vms trying to find out why 
they are getting weird build errors after an OpenVMS upgrade or C RTL ECO.

Anything that is using standard C function names for their own public 
symbols is virtually guaranteed to eventually not build on OpenVMS.

And several people have posted on the SAMBA Technical list for various 
UNIX platforms that have the same problem when SAMBA did the same thing.

-John
[EMAIL PROTECTED]
Personal Opinion Only
PLEASE READ THIS IMPORTANT ETIQUETTE MESSAGE BEFORE POSTING:
http://www.catb.org/~esr/faqs/smart-questions.html