Opened 18 years ago
Last modified 18 years ago
#25 new defect
Import, CMTPATH problem
Reported by: | anonymous | Owned by: | arnault |
---|---|---|---|
Priority: | normal | Milestone: | v1r18 |
Component: | c. Core | Version: | v1r18 |
Severity: | normal | Keywords: | import CMTPATH |
Cc: | OS: | All | |
If Other, could you precise: | Experiment: | Other | |
If Other, could you precise: | |||
Stack trace: | |||
Steps to reproduce: |
Description
Problemm appear in /usr/local/CMT/v1r18p20051108, it works fine in v1r18p20050501. The problem is the following : When we import a foreign package, if this package is not in the same directory as the project, we have to add his path to the CMTPATH. In the case, if the CMTPATH ends with the path of ower project, the import of the foreign package will failed. Ex : I have the following structure :
Test |-- Package | `-- Package1 | `-- mypackageInterface | `-- v1r1810p1 | |-- cmt | `-- src `-- Racine |-- Interfaces | `-- myracineInterface | `-- v1r1810p1 | |-- cmt | `-- src `-- TestImport `-- v1 |-- cmt `-- src
My project is TestImport and the foreign package is myPackageInterface. My requirement for TestImport is :
package TestImport version v1r2p07 use mypackageInterface v1r* -no_auto_imports use myracineInterface v1r* Interfaces -no_auto_imports library myFunction -group=VGM -import=mypackageInterface -import=myracineInterface -s=../src/\ fonctionPrint.cc application test -import=mypackageInterface -import=myracineInterface ../src/test.cc
- if I put the CMTPATH=..../Test/Package/Package1:..../Test/Racine, it will not work because "myracineInterface" will not be import
- if I put the CMTPATH=..../Test/Racine:..../Test/Package/Package1, it will work and import corectly the foreign package...
Attachments (1)
Change History (2)
Changed 18 years ago by
comment:1 Changed 18 years ago by
Command lines to reproduce the bug:
>cd xxxxx/TestImport/cmt; >export CMTPATH=xxx/Test/Package/Package1:xxx/Test/Racine >cmt config >source setup.(c)sh >make VGM (to make the lib) or >make (to make the app)
it will done the following (for lib on mac tiger) :
TestImport/v1/cmt % make VGM ------> (Makefile.header) Rebuilding constituents.make ------> (constituents.make) Rebuilding setup.make Darwin.make CMTCONFIG=Darwin setup.make ok ------> (constituents.make) Rebuilding library links ------> (constituents.make) Building myFunction.make Library myFunction ------> (constituents.make) Starting myFunction ------> (myFunction.make) Rebuilding ../Darwin/myFunction_dependencies.make ../Darwin/fonctionPrint.o cd ../Darwin/; c++ -c -I"../src" -no-cpp-precomp -L/sw/lib -I/sw/include -o fonctionPrint.o -I/MY_RACINE_INTERFACE -I/usr/local/mypackageInterface//include ../src/fonctionPrint.cc library cd ../Darwin/; \ ar -clr ../Darwin/libmyFunction.a ../Darwin/fonctionPrint.o ranlib ../Darwin/libmyFunction.a cat /dev/null >../Darwin/myFunction.stamp cd ../Darwin/; QUIET=; /usr/local/CMT/HEAD/mgr/cmt_make_shlib_common.sh extract "Darwin," myFunction c++ -dynamiclib -flat_namespace -undefined suppress -o libmyFunction.dylib "myFunctiontemp_shlib/fonctionPrint.o" ------> myFunction : library ok ------> myFunction ok ------> (constituents.make) myFunction done VGM ok.
- But the following line is Wrong :
cd ../Darwin/; c++ -c -I"../src" -no-cpp-precomp -L/sw/lib -I/sw/include -o fonctionPrint.o -I/MY_RACINE_INTERFACE -I/usr/local/mypackageInterface//include ../src/fonctionPrint.cc
- It must be :
cd ../Darwin/; c++ -c -I"../src" -no-cpp-precomp -L/sw/lib -I/sw/include -o fonctionPrint.o -I/MY_PACKAGE_INTERFACE -I/MY_RACINE_INTERFACE -I/usr/local/mypackageInterface//include ../src/fonctionPrint.cc
- but if you do :
>export CMTPATH=xxx/Test/Racine:xxx/Test/Package/Package1
- It will work...
Test file