how to modify the softlink created and checked in - clearcase

I have created a softlink in vob
myscript.pl ->/usr2/myscript.pl
and checked in.
now i need to change the path of softlink like,
myscript.pl ->/usr2/john/myscript.pl
How to achieve this, in cleartool
Thanks in advance

As mentioned in this IBM technote:
The only way to revise a VOB symbolic link to a relative path is to create a new symbolic link:
Note: You cannot edit (revise) a VOB symbolic link if it has been created using an absolute path to utilize a relative path.
Check out the directory
Remove the old VOB link using the cleartool rmelem command
Create a new link with the same name
Example:
cleartool ln -slink -nc ../../same_file_name.txt
Check in the directory
Notes:
It is recommended that you use relative VOB symbolic links instead of absolute symbolic links.
The absolute VOB symbolic link requires you to use absolute path names from the view-tag level, for example, \view-tag\VOB-tag\filename.
Hence, they are valid only in the view in which they were created.
Symbolic links that point to files outside the ClearCase MVFS are not supported by the Windows operating system (as opposed to the UNIX and Linux operating systems), and must be created with relative paths as opposed to absolute paths.
Although the cleartool ln command will create the link, the link will not appear in a standard directory listing; it will only be displayed by the cleartool ls command.
This is true for all symbolic links that do not point to a valid MVFS path name.

Related

Calling Custom path binaries using System command

In a linux box my rpm's used to install my software binaries to a predefined "/opt//bin" and "/opt//lib" , and from some binaries(c executable) i used to call these binaries located in /opt//bin by harcoding its full path using system call.
for example : system("/opt/<my_loc>/bin/myBin");
Now I would like to install my software to a custom path so what's the best approach to call the binaries from the new custom path ?
Stop hard-coding the path in each system call. Or at least use a #define so you can update it from your old path to your new path. Then you can generate a suitable config file at build-time via a script.
The better approach is to just configure your PATH environment variable correctly, so you can just tell it what binary you want to run. I order it like this: ~/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin (if your /bin and /sbin is not merged into /usr you will need to add those too). system() uses sh which on my system is dash so you would set your PATH in ~/.profile and/or /etc/profile.
I don't like a binary path per package, so I use the program stow to merge a bunch of per package directories in /usr/local/stow/$package/bin to /usr/local/bin.

How can I change the default search paths in GCC?

We have one build machine which has some static libraries at unusual paths, and gcc doesn't find them when via the -l option, all other build machines run fine. But it seems this one configured incorrectly or something.
The solutions we have tried:
Check the host name of the build machine in build script and add the -L command line option if it matches name the problematic build machine (very ugly).
Print the list of search dirs using the -print-search-dirs option
and symlink the problematic library into the first one (too hackish).
What I would like to do is simply add an extra path to search paths system wide to the gcc.
Is there a way to change/configure the default library search paths in GCC? Is there a config file where the list of the defaults are stored?
You can use
-l:<PATH_TO_YOUR_LIBRARY>
Or you can set up the /etc/ld.so.conf with the path to your directory of which you have the shared library installed. You might have to run ldconfig after that.

Cross-compiling Boost for ARM

I'd like to cross-compile Boost for ARM. Here is some documentation.
Where can I find the file user-config.jam? I don't see it anywhere. Is it something I have to create in the boost root directory?
As the documentation says, this file must be in one of these paths (on Linux) : $HOME or $BOOST_BUILD_PATH. If not, you seem to have to create it.
If it doesn't find user-config.jam, site-config.jam is used.
You can use the --debug-configuration option to find which
configuration files are actually loaded.
Inside the boost source code folder, just run the command:
find . -name user-config.jam
It seems to be
./tools/build/v2/user-config.jam

Running Executable

I have an executable that is generated using VC++. The VC++ project includes some of the dlls and when I tried double clicking the exe, it is asking for the path of the dll's.
Is it possible to place the generic dll's into a common folder, open the exe file using the batch file and provide the reference path of the dll's??
See this link for information on DLL search order on Windows.
Quick and incomplete summary:
The directory where the executable module for the current process is located.
The current directory.
The Windows system directory.
The Windows directory.
The directories listed in the PATH environment variable.
Note: The LIBPATH environment variable is not used.
EDIT
To address the comment about having the external DLLs copied locally:
After adding the files to your project, right-click one, select Properties. In the General section, change Item Type to Custom Build Tool. Now in the new section Custom Build Tool, change the Command Line to copy that particular file to the output directory.
You can also do all the necessary file copying in the Pre/Post-build steps of the project.

How do I build a debian package whose sources include symbolic links outside of the source tree?

I have a project whose source includes symbolic links to other source trees (notably, the CppUTest framework). I need to build a debian package out of my project, but dpkg-source will not follow the symbolic links.
Digging further, I believe this is because the default behavior for tar is not to dereference symbolic links unless explicitly told to (with -h).
I was unable to find a way to pass this extra option to tar when building the debian source tarball.
So what am I doing wrong here? Is it possible to build a debian source tarball whose origin includes symbolic links? If so, how?
As read in this thread.. http://ubuntuforums.org/showpost.php?p=9752860&postcount=3
They can be included in the package just like normal files.
The details depend on the way you're doing the packaging, but using something like the following in debian/rules's `install' target should work:
ln -s /usr/share/whatever/file/you/want $(CURDIR)/debian/<pkgname>/usr/whatever/place/you/want/the/link
Everything inside debian/ will end up inside the .deb, including the symlinks you put there.

Resources