Re: SCons fails to create symlinks (SHLIBVERSION)
Cristian Farcas via Scons-users <[email protected]> Fri, 23 Feb 2024 06:01:28 +0000
| Newsgroups | gmane.comp.programming.tools.scons.user |
|---|---|
| Message-ID | <DS0PR12MB85273F5A056B24FCD74FAC23B3552@DS0PR12MB8527.namprd12.prod.outlook.com> |
It works after I cleaned the old lib, built without SHLIBVERSION. Thanks! It’s really ugly to switch from normal to versioned lib. I cannot request the whole team to do a clean everytime they checkout over my commit. So I have to ensure at each build that libabc.so is deleted if it’s not a symlink. Also, when increasing the version, untracked old version libs remain on the disk. These require special deletion as well... From: Scons-users <[email protected]> On Behalf Of Bill Deegan Sent: Thursday, February 22, 2024 7:05 PM To: SCons users mailing list <[email protected]> Subject: Re: [Scons-users] SCons fails to create symlinks (SHLIBVERSION) try building as :scons -c, then build again. Does that resolve the issue? On Thu, Feb 22, 2024 at 4:43 AM Mats Wichmann <[email protected]<mailto:[email protected]>> wrote: On 2/22/24 04:33, Cristian Farcas via Scons-users wrote: > SCons v4.4.0 > > OS: Ubuntu 20 > > The following command is used: > > SharedLibrary('libabc', sources, SHLIBVERSION='3') > > Bus SCons fais to create the symlinks: > > Create symlinks for: 'path/to/libabc.so.3' > > 'path/to/libabc.so' -> 'path/to/libabc.so.3' > > scons: *** [path/to/libabc.so.3] libabc.so.3: File exists > > Is this a bug or am I doing something wrong? Took a quick look, this will happen if the target (libabc.so) exists and is not a symlink. If it exists and *is* a symlink, it is removed first and things work. This seems to be the planned behavior even if it's a little ugly (and the message is deceptive, since it's reporting on the SCons target being processed, not the symlink that failed to create while processing the target): # If a file or directory exists with the same name as link, an OSError # will be thrown, which should be enough, I think. env.fs.symlink(linktgt, link) Guess: you previously built without SHLIBVERSION, then added it, original shlib still around? _______________________________________________ Scons-users mailing list [email protected]<mailto:[email protected]> https://pairlist4.pair.net/mailman/listinfo/scons-users<https://urldefense.com/v3/__https:/pairlist4.pair.net/mailman/listinfo/scons-users__;!!A4F2R9G_pg!e9o5aTWE77KLugybB_2m41ZsRaDnpwLFxZQ2aSsJu0ouACWtS6OGNUUdw4jeozQwMVe2uZPr946EU-xG-fSa-WtVruk$> _______________________________________________ Scons-users mailing list [email protected] https://pairlist4.pair.net/mailman/listinfo/scons-users