Opened 11 years ago
Closed 11 years ago
#2554 closed defect (fixed)
build of omc creates non-existent link which errors out "make install"
Reported by: | Bill Janssen | Owned by: | Martin Sjölund |
---|---|---|---|
Priority: | high | Milestone: | 1.9.1 |
Component: | Build Environment | Version: | trunk |
Keywords: | Cc: |
Description
on OS X, when I do a clean build of OpenModelica (latest sources) using "make omc", I wind up with a symlink in build/lib/omc, libipopt.la, which points to a non-existent ../libipopt.la. Doing a subsequent "make install" then errors out on this invalid symlink. Removing the symlink by hand after doing "make omc" seems to be a workaround.
This is on OS X.
Attachments (1)
Change History (10)
comment:1 by , 11 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 11 years ago
comment:3 by , 11 years ago
You're using CLANG, I'm using gcc (OS X 10.6). In my build/lib/omc/, libipopt.la is a symlink.
comment:4 by , 11 years ago
clang and gcc won't matter. It is libtool that creates .la-files. And I cannot see any way that it copies symlinks in there from looking at the source...
I fail to see how it would make make install
fail though. Or how removing it and recreating the file would make make omc && make install
work. Some logs would be most helpful.
comment:5 by , 11 years ago
The attached is the part of the log file where libipopt.la is created. You'll see that this line creates the symlink:
(cd .libs && rm -f libipopt.la && ln -s ../libipopt.la libipopt.la)
Which is just fine.
But then this code (in the toplevel Makefile.common) is executed:
cp -pPR 3rdParty/Ipopt-3.11.6/lib/*.* build/lib/omc
which winds up copying the symlink, but not the higher-level file the symlink points to.
It's actually worse than that; in a clean checkout the build errors out with this:
Making install in src/Apps Making install in CUTErInterface make[5]: Nothing to be done for `install-exec-am'. make[5]: Nothing to be done for `install-data-am'. make[5]: Nothing to be done for `install-exec-am'. make[5]: Nothing to be done for `install-data-am'. test -z "/local/open-modelica/share/coin/doc/Ipopt" || /local/open-modelica/src/3rdParty/Ipopt-3.11.6/Ipopt/install-sh -d "/local/open-modelica/share/coin/doc/Ipopt" for file in README AUTHORS LICENSE; do \ if test -f "$file"; then dir=; else dir="./"; fi; \ if test -f "$dir$file"; then /usr/bin/install -c -m 644 "$dir$file" "/local/open-modelica/share/coin/doc/Ipopt/$file"; fi; \ done test -z "/local/open-modelica/lib/pkgconfig" || /local/open-modelica/src/3rdParty/Ipopt-3.11.6/Ipopt/install-sh -d "/local/open-modelica/lib/pkgconfig" /usr/bin/install -c -m 644 'ipopt.pc' '/local/open-modelica/lib/pkgconfig/ipopt.pc' make install-data-hook PKG_CONFIG_PATH=/local/open-modelica/lib64/pkgconfig:/local/open-modelica/lib/pkgconfig:/local/open-modelica/share/pkgconfig:/local/lib/pkgconfig:/usr/X11/share/pkgconfig:/usr/X11/lib/pkgconfig \ pkg-config --libs ipopt > /local/open-modelica/share/coin/doc/Ipopt/ipopt_addlibs_cpp.txt addlibs=`cat /local/open-modelica/share/coin/doc/Ipopt/ipopt_addlibs_cpp.txt` ; \ echo "$addlibs -lstdc++ -lm" > /local/open-modelica/share/coin/doc/Ipopt/ipopt_addlibs_c.txt ; \ for i in -L/local/open-modelica/lib -L/local/lib -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin10/4.6.2 -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin10/4.6.2/../../.. -lgfortran -lSystem -lquadmath -lm coin_dummy ; do \ addlibs=`echo -n " $addlibs " | sed -e "s! $i ! !g"` ; \ done ; \ echo "$addlibs -lstdc++ -lm" > /local/open-modelica/share/coin/doc/Ipopt/ipopt_addlibs_f.txt Run make install-doxydoc to generate and install Doxygen documentation. make[3]: Nothing to be done for `install-data-am'. test ! `uname` = Darwin || install_name_tool -id @rpath/libipopt.1.9.6.dylib 3rdParty/Ipopt-3.11.6/lib/libipopt.1.9.6.dylib install_name_tool: can't open file: 3rdParty/Ipopt-3.11.6/lib/libipopt.1.9.6.dylib (No such file or directory) make: *** [build/lib/omc/libipopt.la] Error 1 %
My version of top-level Makefile.common has this diff:
build/lib/omc/libipopt.la: 3rdParty/Ipopt-3.11.6/Makefile $(MAKE) -C 3rdParty/Ipopt-3.11.6 $(MAKE) -C 3rdParty/Ipopt-3.11.6 install - test ! `uname` = Darwin || install_name_tool -id @rpath/libipopt.1.9.6.dylib 3rdParty/Ipopt-3.11.6/lib/libipopt.1.9.6.dylib - test ! `uname` = Darwin || install_name_tool -id @rpath/libcoinmumps.1.4.11.dylib 3rdParty/Ipopt-3.11.6/lib/libcoinmumps.1.4.11.dylib - cp -pPR 3rdParty/Ipopt-3.11.6/lib/*.* build/lib/omc - cp -pPR 3rdParty/Ipopt-3.11.6/include/coin build/include/omc + -rm -f build/lib/omc/libipopt* + -rm -rf build/include/omc/include/.svn + test ! `uname` = Darwin || install_name_tool -id @rpath/libipopt.1.9.6.dylib 3rdParty/Ipopt-3.11.6/Ipopt/src/Interfaces/.libs/libipopt.1.9.6.dylib + test ! `uname` = Darwin || install_name_tool -id @rpath/libcoinmumps.1.4.11.dylib 3rdParty/Ipopt-3.11.6/ThirdParty/Mumps/.libs/libcoinmumps.1.4.11.dylib + cp -pPR 3rdParty/Ipopt-3.11.6/Ipopt/src/Interfaces/.libs/*.* build/lib/omc + cp -pPR 3rdParty/Ipopt-3.11.6/ThirdParty/Mumps/MUMPS/include build/include/omc ipopt: build/lib/omc/libipopt.la
to work around that.
I don't see how you expect 3rdParty/Ipopt-3.11.6/lib to be populated?
comment:6 by , 11 years ago
If you check the version of OSX we use and test against:
https://test.openmodelica.org/hudson/view/Mac/job/OpenModelica_OSX_BUILD/lastBuild/consoleText
That version of libtool never creates such a symlink, and it does populate 3rdParty/Ipopt-3.11.6/lib:
Libraries have been installed in: /Users/hudson/slave/workspace/OpenModelica_OSX_BUILD/OpenModelica-clang/3rdParty/Ipopt-3.11.6/lib
For you, it says:
Libraries have been installed in: /local/open-modelica/lib
So I assume you set some env.var you shouldn't have set. r18912 could possibly help...
comment:7 by , 11 years ago
Yes, I'd think it could possibly help :-). I'll try it and get back to you.
Apparently the reason you don't see this bug in your Jenkins build is that the configure in that test doesn't use --prefix. Is there a separate test for "make install"?
comment:8 by , 11 years ago
Actually, it doesn't help. But that's because "make distclean" at the top level fails to remove 3rdParty/Ipopt-3.11.6/Makefile. Let me suggest the following addition to Makefile.common:
Index: Makefile.common =================================================================== --- Makefile.common (revision 18966) +++ Makefile.common (working copy) @@ -283,6 +283,7 @@ rm -f OMShell/Makefile OMNotebook/ext/Makefile OMNotebook/OMNotebookQT4/Makefile rm -f $(autoconfGeneratedFiles) rm -f config.status config.log + if test -f 3rdParty/Ipopt-3.11.6/Makefile; then $(MAKE) -C 3rdParty/Ipopt-3.11.6 distclean || true; fi rm -rf build/ fmil-clean: rm -rf 3rdParty/FMIL/build 3rdParty/FMIL/install 3rdParty/FMIL/Makefile
Once I did that, things seem to go as planned.
comment:9 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
make install is tested by the OSX and Linux nightly builds, including using DESTDIR.
r18969 I made use a slightly different approach: make clean now does make distclean in ipopt.
I just get this, no symlinks for the .la-file: