[BGL] adjacency_list.hpp requires to link with serialization lib in 1.44?
Hello,
when trying to update Boost from 1.43 to 1.44 in our code we noticed
that in 1.44 we need to link to the serialization lib as soon as
boost/graph/adjacency_list.hpp is included.
Is this correct behavior or is this a bug?
To reproduce this it is sufficient to build the following test program
hello_adjacency_list.cpp (tested with MSVC-9.0):
#include <iostream>
#include
On Wed, Aug 18, 2010 at 5:09 AM, Oliver Koenig
Hello, when trying to update Boost from 1.43 to 1.44 in our code we noticed that in 1.44 we need to link to the serialization lib as soon as boost/graph/adjacency_list.hpp is included. Is this correct behavior or is this a bug?
To reproduce this it is sufficient to build the following test program hello_adjacency_list.cpp (tested with MSVC-9.0):
#include <iostream> #include
int main(){
std::cout << "hello adjacency_list\n";
return 0; }
With the boost build rule "exe hello_adjacency_list : hello_adjacency_list.cpp ;" compilation fails with: compile-c-c++ ..\..\..\bin\even_utils\test\graph\msvc-9.0\release\address-model-64\threading-multi\hello_adjacency_list.obj hello_adjacency_list.cpp msvc.link ..\..\..\bin\even_utils\test\graph\msvc-9.0\release\address-model-64\threading-multi\hello_adjacency_list.exe LINK : fatal error LNK1104: cannot open file 'libboost_serialization-vc90-mt-1_44.lib'
Using the build rule "exe hello_adjacency_list : hello_adjacency_list.cpp /boost//serialization : <link>shared<define>BOOST_SERIALIZATION_DYN_LINK ;" everything works fine.
Sincerely ok
Looks like a serious bug! -- Dave Abrahams BoostPro Computing http://www.boostpro.com
On Wed, 18 Aug 2010, Oliver Koenig wrote:
Hello, when trying to update Boost from 1.43 to 1.44 in our code we noticed that in 1.44 we need to link to the serialization lib as soon as boost/graph/adjacency_list.hpp is included. Is this correct behavior or is this a bug?
To reproduce this it is sufficient to build the following test program hello_adjacency_list.cpp (tested with MSVC-9.0):
#include <iostream> #include
int main(){
std::cout << "hello adjacency_list\n";
return 0; }
With the boost build rule "exe hello_adjacency_list : hello_adjacency_list.cpp ;" compilation fails with: compile-c-c++ ..\..\..\bin\even_utils\test\graph\msvc-9.0\release\address-model-64\threading-multi\hello_adjacency_list.obj hello_adjacency_list.cpp msvc.link ..\..\..\bin\even_utils\test\graph\msvc-9.0\release\address-model-64\threading-multi\hello_adjacency_list.exe LINK : fatal error LNK1104: cannot open file 'libboost_serialization-vc90-mt-1_44.lib'
Using the build rule "exe hello_adjacency_list : hello_adjacency_list.cpp /boost//serialization : <link>shared<define>BOOST_SERIALIZATION_DYN_LINK ;" everything works fine.
That's odd -- I've been able to build applications using adjacency_list
with only the Boost headers and not linking any Boost libraries. This was
on Linux, though, so maybe your issue is auto-linking related. Shouldn't
auto-linking find the dynamic libraries automatically, though? Also, do
you have "using mpi ;" in your project-config.jam, or are you including
On 18.08.2010 20:11, Jeremiah Willcock wrote:
On Wed, 18 Aug 2010, Oliver Koenig wrote:
Hello, when trying to update Boost from 1.43 to 1.44 in our code we noticed that in 1.44 we need to link to the serialization lib as soon as boost/graph/adjacency_list.hpp is included. Is this correct behavior or is this a bug?
To reproduce this it is sufficient to build the following test program hello_adjacency_list.cpp (tested with MSVC-9.0):
#include <iostream> #include
int main(){
std::cout << "hello adjacency_list\n";
return 0; }
With the boost build rule "exe hello_adjacency_list : hello_adjacency_list.cpp ;" compilation fails with: compile-c-c++ ..\..\..\bin\even_utils\test\graph\msvc-9.0\release\address-model-64\threading-multi\hello_adjacency_list.obj
hello_adjacency_list.cpp msvc.link ..\..\..\bin\even_utils\test\graph\msvc-9.0\release\address-model-64\threading-multi\hello_adjacency_list.exe
LINK : fatal error LNK1104: cannot open file 'libboost_serialization-vc90-mt-1_44.lib'
Using the build rule "exe hello_adjacency_list : hello_adjacency_list.cpp /boost//serialization : <link>shared<define>BOOST_SERIALIZATION_DYN_LINK ;" everything works fine.
That's odd -- I've been able to build applications using adjacency_list with only the Boost headers and not linking any Boost libraries. This was on Linux, though, so maybe your issue is auto-linking related. Shouldn't auto-linking find the dynamic libraries automatically, though? Also, do you have "using mpi ;" in your project-config.jam, or are you including
in any of your files? -- Jeremiah Willcock
To my knowledge there is no auto-linking involved when using Boost Build on Windows. My user-config.jam only has "using msvc : 9.0" and "using python : 2.6". In order to make sure that our sandbox environment does not interact with the compilation of the above hello_adjacency_list.cpp I rebuilt the program within a separate mini-project consisting of the cpp and the Jamroot listed below. With identical results. Jamroot ------- path-constant BOOST_ROOT : ../trunk/external_packages/boost_1_44_0 ; project hello_adjacency_list : default-build <address-model>64 : requirements <include>$(BOOST_ROOT) ; use-project boost : $(BOOST_ROOT) ; #exe hello_adjacency_list : hello_adjacency_list.cpp ; # --> Compilation fails with # LINK : fatal error LNK1104: cannot open file 'libboost_serialization-vc90-mt-1_44.lib' exe hello_adjacency_list : hello_adjacency_list.cpp /boost//serialization : <link>shared:<define>BOOST_SERIALIZATION_DYN_LINK ; # --> Compiles successfully. Sincerely O.Koenig -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
On Wed, 18 Aug 2010, Oliver Koenig wrote:
On 18.08.2010 20:11, Jeremiah Willcock wrote:
On Wed, 18 Aug 2010, Oliver Koenig wrote:
Hello, when trying to update Boost from 1.43 to 1.44 in our code we noticed that in 1.44 we need to link to the serialization lib as soon as boost/graph/adjacency_list.hpp is included. Is this correct behavior or is this a bug?
To reproduce this it is sufficient to build the following test program hello_adjacency_list.cpp (tested with MSVC-9.0):
#include <iostream> #include
int main(){
std::cout << "hello adjacency_list\n";
return 0; }
With the boost build rule "exe hello_adjacency_list : hello_adjacency_list.cpp ;" compilation fails with: compile-c-c++ ..\..\..\bin\even_utils\test\graph\msvc-9.0\release\address-model-64\threading-multi\hello_adjacency_list.obj
hello_adjacency_list.cpp msvc.link ..\..\..\bin\even_utils\test\graph\msvc-9.0\release\address-model-64\threading-multi\hello_adjacency_list.exe
LINK : fatal error LNK1104: cannot open file 'libboost_serialization-vc90-mt-1_44.lib'
Using the build rule "exe hello_adjacency_list : hello_adjacency_list.cpp /boost//serialization : <link>shared<define>BOOST_SERIALIZATION_DYN_LINK ;" everything works fine.
That's odd -- I've been able to build applications using adjacency_list with only the Boost headers and not linking any Boost libraries. This was on Linux, though, so maybe your issue is auto-linking related. Shouldn't auto-linking find the dynamic libraries automatically, though? Also, do you have "using mpi ;" in your project-config.jam, or are you including
in any of your files? -- Jeremiah Willcock
To my knowledge there is no auto-linking involved when using Boost Build on Windows. My user-config.jam only has "using msvc : 9.0" and "using python : 2.6". In order to make sure that our sandbox environment does not interact with the compilation of the above hello_adjacency_list.cpp I rebuilt the program within a separate mini-project consisting of the cpp and the Jamroot listed below. With identical results.
Jamroot ------- path-constant BOOST_ROOT : ../trunk/external_packages/boost_1_44_0 ;
project hello_adjacency_list : default-build <address-model>64 : requirements <include>$(BOOST_ROOT) ;
use-project boost : $(BOOST_ROOT) ;
#exe hello_adjacency_list : hello_adjacency_list.cpp ; # --> Compilation fails with # LINK : fatal error LNK1104: cannot open file 'libboost_serialization-vc90-mt-1_44.lib'
exe hello_adjacency_list : hello_adjacency_list.cpp /boost//serialization : <link>shared:<define>BOOST_SERIALIZATION_DYN_LINK ; # --> Compiles successfully.
I tried the source file and Jamroot (first version you commented out) you gave against the Boost trunk and it compiled without any trouble on Linux. I see no reason that 1.44.0 would behave any differently. -- Jeremiah Willcock
On 8/18/2010 3:09 PM, Oliver Koenig wrote:
Hello, when trying to update Boost from 1.43 to 1.44 in our code we noticed that in 1.44 we need to link to the serialization lib as soon as boost/graph/adjacency_list.hpp is included. Is this correct behavior or is this a bug?
To reproduce this it is sufficient to build the following test program hello_adjacency_list.cpp (tested with MSVC-9.0):
#include <iostream> #include
int main(){
std::cout << "hello adjacency_list\n";
return 0; }
With the boost build rule "exe hello_adjacency_list : hello_adjacency_list.cpp ;" compilation fails with: compile-c-c++ ..\..\..\bin\even_utils\test\graph\msvc-9.0\release\address-model-64\threading-multi\hello_adjacency_list.obj
hello_adjacency_list.cpp msvc.link ..\..\..\bin\even_utils\test\graph\msvc-9.0\release\address-model-64\threading-multi\hello_adjacency_list.exe
LINK : fatal error LNK1104: cannot open file 'libboost_serialization-vc90-mt-1_44.lib'
Using the build rule "exe hello_adjacency_list : hello_adjacency_list.cpp /boost//serialization : <link>shared<define>BOOST_SERIALIZATION_DYN_LINK ;" everything works fine.
Sincerely ok
Hello,
I can reproduce your problem. I think the problem is the addition of
#include
Hello,
I can reproduce your problem. I think the problem is the addition of #include
within boost\serialization\serialization.hpp which pulls in auto linking. Simply commenting out that include stops the automatic linking
Looks like a mistake to me.
but will most likely break some other code.
I don't think so. Robert Ramey
participants (5)
-
Dave Abrahams
-
Jeremiah Willcock
-
Oliver Koenig
-
Robert Ramey
-
Stefan van Kessel