Many undefined references for libboost_filesystem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
24 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Many undefined references for libboost_filesystem

Boost - Users mailing list
Hi,

I am trying to build a suite as described at https://github.com/gpgpu-sim/ispass2009-benchmarks

Some of the benchmarks use boost. For example, AES/Makefile has

 

LINKFLAGS       := -L$(BOOST_LIB) -lboost_filesystem

 

Also, the Makefile.ispass-2009 in the root folder has the following settings

 

SETENV=export BINDIR=$(BINDIR); \

           export ROOTDIR=$(NVIDIA_COMPUTE_SDK_LOCATION)/C/src/; \

           export BINSUBDIR=$(BINSUBDIR); \

           export BOOST_LIB=/home/mahmood/boost_1_46_0/lib; \

           export BOOST_ROOT=/home/mahmood/boost_1_46_0/include; \

           export BOOST_VER=""; \

           export OPENMPI_BINDIR=/usr/bin/;

 

 

I manually built boost_1_46_0 with the steps described at http://www.boost.org/doc/libs/1_46_1/doc/html/bbv2/installation.html

The installations was successful and I can see lib/ and include/ folders

 

mahmood@vb:boost_1_46_0$ find lib -name libboost_system*

lib/libboost_system.so.1.46.0

lib/libboost_system.so

lib/libboost_system.a

mahmood@vb:boost_1_46_0$ find lib -name libboost_filesystem*

lib/libboost_filesystem.so

lib/libboost_filesystem.a

lib/libboost_filesystem.so.1.46.0

 

 

 

However, as I run “make -f Makefile.ispass-2009”, I get many undefined errors about libboost_filesystem. Please see below

 

 

 

export BINDIR=/home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/bin/; export ROOTDIR=/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src/; export BINSUBDIR=release; export BOOST_LIB=/home/mahmood/boost_1_46_0/lib; export BOOST_ROOT=/home/mahmood/boost_1_46_0/include; export BOOST_VER=""; export OPENMPI_BINDIR=/usr/bin/;  make noinline=0 -C AES

make[1]: Entering directory `/home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/AES'

obj/x86_64/release/aesCudaUtils.cpp.o: In function `readFromFileForm(boost::filesystem3::path&, std::vector<unsigned int, std::allocator<unsigned int> >&)':

aesCudaUtils.cpp:(.text+0x97d): undefined reference to `boost::filesystem3::detail::status(boost::filesystem3::path const&, boost::system::error_code*)'

obj/x86_64/release/aesCudaUtils.cpp.o: In function `readFromFileNotForm(boost::filesystem3::path&, char*, unsigned int)':

aesCudaUtils.cpp:(.text+0xe81): undefined reference to `boost::filesystem3::detail::status(boost::filesystem3::path const&, boost::system::error_code*)'

obj/x86_64/release/aesCudaUtils.cpp.o: In function `getFileSize(boost::filesystem3::path&)':

aesCudaUtils.cpp:(.text+0x1244): undefined reference to `boost::filesystem3::detail::status(boost::filesystem3::path const&, boost::system::error_code*)'

aesCudaUtils.cpp:(.text+0x1257): undefined reference to `boost::filesystem3::detail::file_size(boost::filesystem3::path const&, boost::system::error_code*)'

obj/x86_64/release/aesCudaUtils.cpp.o: In function `initAesCuda(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned char*, unsigned int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, char*, unsigned int)':

aesCudaUtils.cpp:(.text+0x1c54): undefined reference to `boost::filesystem3::path::wchar_t_codecvt_facet()'

aesCudaUtils.cpp:(.text+0x1cab): undefined reference to `boost::filesystem3::path::wchar_t_codecvt_facet()'

aesCudaUtils.cpp:(.text+0x1ce5): undefined reference to `boost::filesystem3::detail::status(boost::filesystem3::path const&, boost::system::error_code*)'

aesCudaUtils.cpp:(.text+0x1d02): undefined reference to `boost::filesystem3::detail::status(boost::filesystem3::path const&, boost::system::error_code*)'

obj/x86_64/release/aesCudaUtils.cpp.o: In function `_GLOBAL__sub_I_aesCudaUtils.cpp':

aesCudaUtils.cpp:(.text.startup+0x2b): undefined reference to `boost::system::generic_category()'

aesCudaUtils.cpp:(.text.startup+0x37): undefined reference to `boost::system::generic_category()'

aesCudaUtils.cpp:(.text.startup+0x43): undefined reference to `boost::system::system_category()'

obj/x86_64/release/aescuda.cpp.o: In function `_GLOBAL__sub_I_aescuda.cpp':

aescuda.cpp:(.text.startup+0x68b): undefined reference to `boost::system::generic_category()'

aescuda.cpp:(.text.startup+0x697): undefined reference to `boost::system::generic_category()'

aescuda.cpp:(.text.startup+0x6a3): undefined reference to `boost::system::system_category()'

collect2: ld returned 1 exit status

make[1]: *** [/home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/bin//release/AES] Error 1

make[1]: Leaving directory `/home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/AES'

make: *** [default] Error 2

 

 

 

Any thought on that?


Regards,
Mahmood

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Many undefined references for libboost_filesystem

Boost - Users mailing list
you are probably using the wrong version of filesystem, or maybe of
boost. often those projects need a specific boost version.

2017-10-13 14:24 GMT-04:00 Mahmood N via Boost-users
<[hidden email]>:

> Hi,
>
> I am trying to build a suite as described at
> https://github.com/gpgpu-sim/ispass2009-benchmarks
>
> Some of the benchmarks use boost. For example, AES/Makefile has
>
>
>
> LINKFLAGS       := -L$(BOOST_LIB) -lboost_filesystem
>
>
>
> Also, the Makefile.ispass-2009 in the root folder has the following settings
>
>
>
> SETENV=export BINDIR=$(BINDIR); \
>
>            export ROOTDIR=$(NVIDIA_COMPUTE_SDK_LOCATION)/C/src/; \
>
>            export BINSUBDIR=$(BINSUBDIR); \
>
>            export BOOST_LIB=/home/mahmood/boost_1_46_0/lib; \
>
>            export BOOST_ROOT=/home/mahmood/boost_1_46_0/include; \
>
>            export BOOST_VER=""; \
>
>            export OPENMPI_BINDIR=/usr/bin/;
>
>
>
>
>
> I manually built boost_1_46_0 with the steps described at
> http://www.boost.org/doc/libs/1_46_1/doc/html/bbv2/installation.html
>
> The installations was successful and I can see lib/ and include/ folders
>
>
>
> mahmood@vb:boost_1_46_0$ find lib -name libboost_system*
>
> lib/libboost_system.so.1.46.0
>
> lib/libboost_system.so
>
> lib/libboost_system.a
>
> mahmood@vb:boost_1_46_0$ find lib -name libboost_filesystem*
>
> lib/libboost_filesystem.so
>
> lib/libboost_filesystem.a
>
> lib/libboost_filesystem.so.1.46.0
>
>
>
>
>
>
>
> However, as I run “make -f Makefile.ispass-2009”, I get many undefined
> errors about libboost_filesystem. Please see below
>
>
>
>
>
>
>
> export
> BINDIR=/home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/bin/;
> export ROOTDIR=/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src/; export
> BINSUBDIR=release; export BOOST_LIB=/home/mahmood/boost_1_46_0/lib; export
> BOOST_ROOT=/home/mahmood/boost_1_46_0/include; export BOOST_VER=""; export
> OPENMPI_BINDIR=/usr/bin/;  make noinline=0 -C AES
>
> make[1]: Entering directory
> `/home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/AES'
>
> obj/x86_64/release/aesCudaUtils.cpp.o: In function
> `readFromFileForm(boost::filesystem3::path&, std::vector<unsigned int,
> std::allocator<unsigned int> >&)':
>
> aesCudaUtils.cpp:(.text+0x97d): undefined reference to
> `boost::filesystem3::detail::status(boost::filesystem3::path const&,
> boost::system::error_code*)'
>
> obj/x86_64/release/aesCudaUtils.cpp.o: In function
> `readFromFileNotForm(boost::filesystem3::path&, char*, unsigned int)':
>
> aesCudaUtils.cpp:(.text+0xe81): undefined reference to
> `boost::filesystem3::detail::status(boost::filesystem3::path const&,
> boost::system::error_code*)'
>
> obj/x86_64/release/aesCudaUtils.cpp.o: In function
> `getFileSize(boost::filesystem3::path&)':
>
> aesCudaUtils.cpp:(.text+0x1244): undefined reference to
> `boost::filesystem3::detail::status(boost::filesystem3::path const&,
> boost::system::error_code*)'
>
> aesCudaUtils.cpp:(.text+0x1257): undefined reference to
> `boost::filesystem3::detail::file_size(boost::filesystem3::path const&,
> boost::system::error_code*)'
>
> obj/x86_64/release/aesCudaUtils.cpp.o: In function
> `initAesCuda(std::basic_string<char, std::char_traits<char>,
> std::allocator<char> >, unsigned char*, unsigned int,
> std::basic_string<char, std::char_traits<char>, std::allocator<char> >,
> char*, unsigned int)':
>
> aesCudaUtils.cpp:(.text+0x1c54): undefined reference to
> `boost::filesystem3::path::wchar_t_codecvt_facet()'
>
> aesCudaUtils.cpp:(.text+0x1cab): undefined reference to
> `boost::filesystem3::path::wchar_t_codecvt_facet()'
>
> aesCudaUtils.cpp:(.text+0x1ce5): undefined reference to
> `boost::filesystem3::detail::status(boost::filesystem3::path const&,
> boost::system::error_code*)'
>
> aesCudaUtils.cpp:(.text+0x1d02): undefined reference to
> `boost::filesystem3::detail::status(boost::filesystem3::path const&,
> boost::system::error_code*)'
>
> obj/x86_64/release/aesCudaUtils.cpp.o: In function
> `_GLOBAL__sub_I_aesCudaUtils.cpp':
>
> aesCudaUtils.cpp:(.text.startup+0x2b): undefined reference to
> `boost::system::generic_category()'
>
> aesCudaUtils.cpp:(.text.startup+0x37): undefined reference to
> `boost::system::generic_category()'
>
> aesCudaUtils.cpp:(.text.startup+0x43): undefined reference to
> `boost::system::system_category()'
>
> obj/x86_64/release/aescuda.cpp.o: In function `_GLOBAL__sub_I_aescuda.cpp':
>
> aescuda.cpp:(.text.startup+0x68b): undefined reference to
> `boost::system::generic_category()'
>
> aescuda.cpp:(.text.startup+0x697): undefined reference to
> `boost::system::generic_category()'
>
> aescuda.cpp:(.text.startup+0x6a3): undefined reference to
> `boost::system::system_category()'
>
> collect2: ld returned 1 exit status
>
> make[1]: ***
> [/home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/bin//release/AES]
> Error 1
>
> make[1]: Leaving directory
> `/home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/AES'
>
> make: *** [default] Error 2
>
>
>
>
>
>
>
> Any thought on that?
>
>
> Regards,
> Mahmood
>
> _______________________________________________
> Boost-users mailing list
> [hidden email]
> https://lists.boost.org/mailman/listinfo.cgi/boost-users



--
Daniel
L'action accède à la perfection quand, bien que vivant, vous êtes déjà mort
Bunan
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Many undefined references for libboost_filesystem

Boost - Users mailing list
In reply to this post by Boost - Users mailing list
Hi Daniel,
I tried some other versions based on the release date of the project and boosts. I tried 1.38 and 40 and 42 and 44 and 46. All of them return some undefined references.

How can i find which boost version is used in the project?

Regards,
Mahmood

--------------------------------------------
On Sat, 10/14/17, Daniel Anderson <[hidden email]> wrote:

 Subject: Re: [Boost-users] Many undefined references for libboost_filesystem
 To: [hidden email]
 Cc: "Mahmood N" <[hidden email]>
 Date: Saturday, October 14, 2017, 12:53 AM
 
 you are probably using the wrong
 version of filesystem, or maybe of
 boost.
 often those projects need a specific boost version.
 
 2017-10-13 14:24 GMT-04:00
 Mahmood N via Boost-users
 <[hidden email]>:
 >
 Hi,
 >
 > I am trying to
 build a suite as described at
 > https://github.com/gpgpu-sim/ispass2009-benchmarks
 >
 > Some of the
 benchmarks use boost. For example, AES/Makefile has
 >
 >
 >
 > LINKFLAGS       :=
 -L$(BOOST_LIB) -lboost_filesystem
 >
 >
 >
 >
 Also, the Makefile.ispass-2009 in the root folder has the
 following settings
 >
 >
 >
 >
 SETENV=export BINDIR=$(BINDIR); \
 >
 >            export
 ROOTDIR=$(NVIDIA_COMPUTE_SDK_LOCATION)/C/src/; \
 >
 >           
 export BINSUBDIR=$(BINSUBDIR); \
 >
 >            export
 BOOST_LIB=/home/mahmood/boost_1_46_0/lib; \
 >
 >           
 export BOOST_ROOT=/home/mahmood/boost_1_46_0/include; \
 >
 >           
 export BOOST_VER=""; \
 >
 >            export
 OPENMPI_BINDIR=/usr/bin/;
 >
 >
 >
 >
 >
 >
 I manually built boost_1_46_0 with the steps described at
 > http://www.boost.org/doc/libs/1_46_1/doc/html/bbv2/installation.html
 >
 > The installations was
 successful and I can see lib/ and include/ folders
 >
 >
 >
 > mahmood@vb:boost_1_46_0$
 find lib -name libboost_system*
 >
 > lib/libboost_system.so.1.46.0
 >
 >
 lib/libboost_system.so
 >
 > lib/libboost_system.a
 >
 > mahmood@vb:boost_1_46_0$
 find lib -name libboost_filesystem*
 >
 > lib/libboost_filesystem.so
 >
 >
 lib/libboost_filesystem.a
 >
 > lib/libboost_filesystem.so.1.46.0
 >
 >
 >
 >
 >
 >
 >
 > However, as I run
 “make -f Makefile.ispass-2009”, I get many undefined
 > errors about libboost_filesystem. Please
 see below
 >
 >
 >
 >
 >
 >
 >
 > export
 >
 BINDIR=/home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/bin/;
 > export
 ROOTDIR=/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src/;
 export
 > BINSUBDIR=release; export
 BOOST_LIB=/home/mahmood/boost_1_46_0/lib; export
 >
 BOOST_ROOT=/home/mahmood/boost_1_46_0/include; export
 BOOST_VER=""; export
 >
 OPENMPI_BINDIR=/usr/bin/;  make noinline=0 -C AES
 >
 > make[1]: Entering
 directory
 >
 `/home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/AES'
 >
 >
 obj/x86_64/release/aesCudaUtils.cpp.o: In function
 >
 `readFromFileForm(boost::filesystem3::path&,
 std::vector<unsigned int,
 >
 std::allocator<unsigned int> >&)':
 >
 >
 aesCudaUtils.cpp:(.text+0x97d): undefined reference to
 >
 `boost::filesystem3::detail::status(boost::filesystem3::path
 const&,
 >
 boost::system::error_code*)'
 >
 > obj/x86_64/release/aesCudaUtils.cpp.o: In
 function
 >
 `readFromFileNotForm(boost::filesystem3::path&, char*,
 unsigned int)':
 >
 > aesCudaUtils.cpp:(.text+0xe81): undefined
 reference to
 >
 `boost::filesystem3::detail::status(boost::filesystem3::path
 const&,
 >
 boost::system::error_code*)'
 >
 > obj/x86_64/release/aesCudaUtils.cpp.o: In
 function
 >
 `getFileSize(boost::filesystem3::path&)':
 >
 >
 aesCudaUtils.cpp:(.text+0x1244): undefined reference to
 >
 `boost::filesystem3::detail::status(boost::filesystem3::path
 const&,
 >
 boost::system::error_code*)'
 >
 > aesCudaUtils.cpp:(.text+0x1257): undefined
 reference to
 >
 `boost::filesystem3::detail::file_size(boost::filesystem3::path
 const&,
 >
 boost::system::error_code*)'
 >
 > obj/x86_64/release/aesCudaUtils.cpp.o: In
 function
 >
 `initAesCuda(std::basic_string<char,
 std::char_traits<char>,
 >
 std::allocator<char> >, unsigned char*, unsigned
 int,
 > std::basic_string<char,
 std::char_traits<char>, std::allocator<char>
 >,
 > char*, unsigned int)':
 >
 >
 aesCudaUtils.cpp:(.text+0x1c54): undefined reference to
 >
 `boost::filesystem3::path::wchar_t_codecvt_facet()'
 >
 >
 aesCudaUtils.cpp:(.text+0x1cab): undefined reference to
 >
 `boost::filesystem3::path::wchar_t_codecvt_facet()'
 >
 >
 aesCudaUtils.cpp:(.text+0x1ce5): undefined reference to
 >
 `boost::filesystem3::detail::status(boost::filesystem3::path
 const&,
 >
 boost::system::error_code*)'
 >
 > aesCudaUtils.cpp:(.text+0x1d02): undefined
 reference to
 >
 `boost::filesystem3::detail::status(boost::filesystem3::path
 const&,
 >
 boost::system::error_code*)'
 >
 > obj/x86_64/release/aesCudaUtils.cpp.o: In
 function
 >
 `_GLOBAL__sub_I_aesCudaUtils.cpp':
 >
 >
 aesCudaUtils.cpp:(.text.startup+0x2b): undefined reference
 to
 >
 `boost::system::generic_category()'
 >
 >
 aesCudaUtils.cpp:(.text.startup+0x37): undefined reference
 to
 >
 `boost::system::generic_category()'
 >
 >
 aesCudaUtils.cpp:(.text.startup+0x43): undefined reference
 to
 >
 `boost::system::system_category()'
 >
 >
 obj/x86_64/release/aescuda.cpp.o: In function
 `_GLOBAL__sub_I_aescuda.cpp':
 >
 > aescuda.cpp:(.text.startup+0x68b):
 undefined reference to
 >
 `boost::system::generic_category()'
 >
 >
 aescuda.cpp:(.text.startup+0x697): undefined reference to
 > `boost::system::generic_category()'
 >
 >
 aescuda.cpp:(.text.startup+0x6a3): undefined reference to
 > `boost::system::system_category()'
 >
 > collect2: ld returned
 1 exit status
 >
 >
 make[1]: ***
 >
 [/home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/bin//release/AES]
 > Error 1
 >
 > make[1]: Leaving directory
 >
 `/home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/AES'
 >
 > make: *** [default]
 Error 2
 >
 >
 >
 >
 >
 >
 >
 > Any thought on
 that?
 >
 >
 > Regards,
 >
 Mahmood
 >
 >
 _______________________________________________
 > Boost-users mailing list
 > [hidden email]
 > https://lists.boost.org/mailman/listinfo.cgi/boost-users
 
 
 
 --
 Daniel
 L'action accède à la perfection quand,
 bien que vivant, vous êtes déjà mort
 Bunan
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Many undefined references for libboost_filesystem

Boost - Users mailing list
You first has to find at which step you have an error.

once you know which step is failing it's easier to find the problem and fix it.

Do you have errors compiling ?
Do you have errors linking ?

then change your build system to output the commands and check for
missing arguments or misspelled paths.

in complex builds there could be more problems than just
compiling/linking of course i.e. configuration switch, defines, etc...

I'm working with Visual Studio Professional, I usually do not have
those kinds of problems.

but at a glance you seems to have linking problems.


2017-10-15 7:15 GMT-04:00 Mahmood N <[hidden email]>:

> Hi Daniel,
> I tried some other versions based on the release date of the project and boosts. I tried 1.38 and 40 and 42 and 44 and 46. All of them return some undefined references.
>
> How can i find which boost version is used in the project?
>
> Regards,
> Mahmood
>
> --------------------------------------------
> On Sat, 10/14/17, Daniel Anderson <[hidden email]> wrote:
>
>  Subject: Re: [Boost-users] Many undefined references for libboost_filesystem
>  To: [hidden email]
>  Cc: "Mahmood N" <[hidden email]>
>  Date: Saturday, October 14, 2017, 12:53 AM
>
>  you are probably using the wrong
>  version of filesystem, or maybe of
>  boost.
>  often those projects need a specific boost version.
>
>  2017-10-13 14:24 GMT-04:00
>  Mahmood N via Boost-users
>  <[hidden email]>:
>  >
>  Hi,
>  >
>  > I am trying to
>  build a suite as described at
>  > https://github.com/gpgpu-sim/ispass2009-benchmarks
>  >
>  > Some of the
>  benchmarks use boost. For example, AES/Makefile has
>  >
>  >
>  >
>  > LINKFLAGS       :=
>  -L$(BOOST_LIB) -lboost_filesystem
>  >
>  >
>  >
>  >
>  Also, the Makefile.ispass-2009 in the root folder has the
>  following settings
>  >
>  >
>  >
>  >
>  SETENV=export BINDIR=$(BINDIR); \
>  >
>  >            export
>  ROOTDIR=$(NVIDIA_COMPUTE_SDK_LOCATION)/C/src/; \
>  >
>  >
>  export BINSUBDIR=$(BINSUBDIR); \
>  >
>  >            export
>  BOOST_LIB=/home/mahmood/boost_1_46_0/lib; \
>  >
>  >
>  export BOOST_ROOT=/home/mahmood/boost_1_46_0/include; \
>  >
>  >
>  export BOOST_VER=""; \
>  >
>  >            export
>  OPENMPI_BINDIR=/usr/bin/;
>  >
>  >
>  >
>  >
>  >
>  >
>  I manually built boost_1_46_0 with the steps described at
>  > http://www.boost.org/doc/libs/1_46_1/doc/html/bbv2/installation.html
>  >
>  > The installations was
>  successful and I can see lib/ and include/ folders
>  >
>  >
>  >
>  > mahmood@vb:boost_1_46_0$
>  find lib -name libboost_system*
>  >
>  > lib/libboost_system.so.1.46.0
>  >
>  >
>  lib/libboost_system.so
>  >
>  > lib/libboost_system.a
>  >
>  > mahmood@vb:boost_1_46_0$
>  find lib -name libboost_filesystem*
>  >
>  > lib/libboost_filesystem.so
>  >
>  >
>  lib/libboost_filesystem.a
>  >
>  > lib/libboost_filesystem.so.1.46.0
>  >
>  >
>  >
>  >
>  >
>  >
>  >
>  > However, as I run
>  “make -f Makefile.ispass-2009”, I get many undefined
>  > errors about libboost_filesystem. Please
>  see below
>  >
>  >
>  >
>  >
>  >
>  >
>  >
>  > export
>  >
>  BINDIR=/home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/bin/;
>  > export
>  ROOTDIR=/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src/;
>  export
>  > BINSUBDIR=release; export
>  BOOST_LIB=/home/mahmood/boost_1_46_0/lib; export
>  >
>  BOOST_ROOT=/home/mahmood/boost_1_46_0/include; export
>  BOOST_VER=""; export
>  >
>  OPENMPI_BINDIR=/usr/bin/;  make noinline=0 -C AES
>  >
>  > make[1]: Entering
>  directory
>  >
>  `/home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/AES'
>  >
>  >
>  obj/x86_64/release/aesCudaUtils.cpp.o: In function
>  >
>  `readFromFileForm(boost::filesystem3::path&,
>  std::vector<unsigned int,
>  >
>  std::allocator<unsigned int> >&)':
>  >
>  >
>  aesCudaUtils.cpp:(.text+0x97d): undefined reference to
>  >
>  `boost::filesystem3::detail::status(boost::filesystem3::path
>  const&,
>  >
>  boost::system::error_code*)'
>  >
>  > obj/x86_64/release/aesCudaUtils.cpp.o: In
>  function
>  >
>  `readFromFileNotForm(boost::filesystem3::path&, char*,
>  unsigned int)':
>  >
>  > aesCudaUtils.cpp:(.text+0xe81): undefined
>  reference to
>  >
>  `boost::filesystem3::detail::status(boost::filesystem3::path
>  const&,
>  >
>  boost::system::error_code*)'
>  >
>  > obj/x86_64/release/aesCudaUtils.cpp.o: In
>  function
>  >
>  `getFileSize(boost::filesystem3::path&)':
>  >
>  >
>  aesCudaUtils.cpp:(.text+0x1244): undefined reference to
>  >
>  `boost::filesystem3::detail::status(boost::filesystem3::path
>  const&,
>  >
>  boost::system::error_code*)'
>  >
>  > aesCudaUtils.cpp:(.text+0x1257): undefined
>  reference to
>  >
>  `boost::filesystem3::detail::file_size(boost::filesystem3::path
>  const&,
>  >
>  boost::system::error_code*)'
>  >
>  > obj/x86_64/release/aesCudaUtils.cpp.o: In
>  function
>  >
>  `initAesCuda(std::basic_string<char,
>  std::char_traits<char>,
>  >
>  std::allocator<char> >, unsigned char*, unsigned
>  int,
>  > std::basic_string<char,
>  std::char_traits<char>, std::allocator<char>
>  >,
>  > char*, unsigned int)':
>  >
>  >
>  aesCudaUtils.cpp:(.text+0x1c54): undefined reference to
>  >
>  `boost::filesystem3::path::wchar_t_codecvt_facet()'
>  >
>  >
>  aesCudaUtils.cpp:(.text+0x1cab): undefined reference to
>  >
>  `boost::filesystem3::path::wchar_t_codecvt_facet()'
>  >
>  >
>  aesCudaUtils.cpp:(.text+0x1ce5): undefined reference to
>  >
>  `boost::filesystem3::detail::status(boost::filesystem3::path
>  const&,
>  >
>  boost::system::error_code*)'
>  >
>  > aesCudaUtils.cpp:(.text+0x1d02): undefined
>  reference to
>  >
>  `boost::filesystem3::detail::status(boost::filesystem3::path
>  const&,
>  >
>  boost::system::error_code*)'
>  >
>  > obj/x86_64/release/aesCudaUtils.cpp.o: In
>  function
>  >
>  `_GLOBAL__sub_I_aesCudaUtils.cpp':
>  >
>  >
>  aesCudaUtils.cpp:(.text.startup+0x2b): undefined reference
>  to
>  >
>  `boost::system::generic_category()'
>  >
>  >
>  aesCudaUtils.cpp:(.text.startup+0x37): undefined reference
>  to
>  >
>  `boost::system::generic_category()'
>  >
>  >
>  aesCudaUtils.cpp:(.text.startup+0x43): undefined reference
>  to
>  >
>  `boost::system::system_category()'
>  >
>  >
>  obj/x86_64/release/aescuda.cpp.o: In function
>  `_GLOBAL__sub_I_aescuda.cpp':
>  >
>  > aescuda.cpp:(.text.startup+0x68b):
>  undefined reference to
>  >
>  `boost::system::generic_category()'
>  >
>  >
>  aescuda.cpp:(.text.startup+0x697): undefined reference to
>  > `boost::system::generic_category()'
>  >
>  >
>  aescuda.cpp:(.text.startup+0x6a3): undefined reference to
>  > `boost::system::system_category()'
>  >
>  > collect2: ld returned
>  1 exit status
>  >
>  >
>  make[1]: ***
>  >
>  [/home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/bin//release/AES]
>  > Error 1
>  >
>  > make[1]: Leaving directory
>  >
>  `/home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/AES'
>  >
>  > make: *** [default]
>  Error 2
>  >
>  >
>  >
>  >
>  >
>  >
>  >
>  > Any thought on
>  that?
>  >
>  >
>  > Regards,
>  >
>  Mahmood
>  >
>  >
>  _______________________________________________
>  > Boost-users mailing list
>  > [hidden email]
>  > https://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>
>
>  --
>  Daniel
>  L'action accède à la perfection quand,
>  bien que vivant, vous êtes déjà mort
>  Bunan



--
Daniel
L'action accède à la perfection quand, bien que vivant, vous êtes déjà mort
Bunan
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Many undefined references for libboost_filesystem

Boost - Users mailing list

The error (undefined reference) clearly is in the linking step.

 

For example, I get

 

export BINDIR=/home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/bin/; export ROOTDIR=/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src/; export BINSUBDIR=release; export BOOST_LIB=/home/mahmood/boost_1_40_0/lib; export BOOST_ROOT=/home/mahmood/boost_1_40_0; export BOOST_VER=""; export OPENMPI_BINDIR=/usr/bin/;  make noinline=0 -C AES

make[1]: Entering directory `/home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/AES'

obj/x86_64/release/aescuda.cpp.o: In function `_GLOBAL__sub_I_aescuda.cpp':

aescuda.cpp:(.text.startup+0x68b): undefined reference to `boost::system::get_system_category()'

aescuda.cpp:(.text.startup+0x697): undefined reference to `boost::system::get_generic_category()'

aescuda.cpp:(.text.startup+0x6a3): undefined reference to `boost::system::get_generic_category()'

aescuda.cpp:(.text.startup+0x6af): undefined reference to `boost::system::get_generic_category()'

aescuda.cpp:(.text.startup+0x6bb): undefined reference to `boost::system::get_system_category()'

 

 

And AES/Makefile contains

 

LINKFLAGS       := -L$(BOOST_LIB)

 

 

 

As you can see the BOOST_LIB variable points to /home/mahmood/boost_1_40_0/lib and such functions are in the library files

 

mahmood@vb:boost_1_40_0$ grep -r get_system_category lib

Binary file lib/libboost_system.so.1.40.0 matches

Binary file lib/libboost_system.so matches

Binary file lib/libboost_system.a matches

Binary file lib/libboost_filesystem.a matches

Binary file lib/libboost_filesystem.so matches

Binary file lib/libboost_filesystem.so.1.40.0 matches

 

 

 

 

So, all things look normal. Isn’t that? Why I got that error?

 

 

Regards,

Mahmood

 

 

 

Sent from Mail for Windows 10

 


_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Many undefined references for libboost_filesystem

Boost - Users mailing list
look at your linking command, you are probably missing path to the
boost directory.

I see "export" but this does nothing to the linker. check if the
makefile uses those exports.

2017-10-15 9:48 GMT-04:00 mahmood n <[hidden email]>:

> The error (undefined reference) clearly is in the linking step.
>
>
>
> For example, I get
>
>
>
> export
> BINDIR=/home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/bin/;
> export ROOTDIR=/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src/; export
> BINSUBDIR=release; export BOOST_LIB=/home/mahmood/boost_1_40_0/lib; export
> BOOST_ROOT=/home/mahmood/boost_1_40_0; export BOOST_VER=""; export
> OPENMPI_BINDIR=/usr/bin/;  make noinline=0 -C AES
>
> make[1]: Entering directory
> `/home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/AES'
>
> obj/x86_64/release/aescuda.cpp.o: In function `_GLOBAL__sub_I_aescuda.cpp':
>
> aescuda.cpp:(.text.startup+0x68b): undefined reference to
> `boost::system::get_system_category()'
>
> aescuda.cpp:(.text.startup+0x697): undefined reference to
> `boost::system::get_generic_category()'
>
> aescuda.cpp:(.text.startup+0x6a3): undefined reference to
> `boost::system::get_generic_category()'
>
> aescuda.cpp:(.text.startup+0x6af): undefined reference to
> `boost::system::get_generic_category()'
>
> aescuda.cpp:(.text.startup+0x6bb): undefined reference to
> `boost::system::get_system_category()'
>
>
>
>
>
> And AES/Makefile contains
>
>
>
> LINKFLAGS       := -L$(BOOST_LIB)
>
>
>
>
>
>
>
> As you can see the BOOST_LIB variable points to
> /home/mahmood/boost_1_40_0/lib and such functions are in the library files
>
>
>
> mahmood@vb:boost_1_40_0$ grep -r get_system_category lib
>
> Binary file lib/libboost_system.so.1.40.0 matches
>
> Binary file lib/libboost_system.so matches
>
> Binary file lib/libboost_system.a matches
>
> Binary file lib/libboost_filesystem.a matches
>
> Binary file lib/libboost_filesystem.so matches
>
> Binary file lib/libboost_filesystem.so.1.40.0 matches
>
>
>
>
>
>
>
>
>
> So, all things look normal. Isn’t that? Why I got that error?
>
>
>
>
>
> Regards,
>
> Mahmood
>
>
>
>
>
>
>
> Sent from Mail for Windows 10
>
>



--
Daniel
L'action accède à la perfection quand, bien que vivant, vous êtes déjà mort
Bunan
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Many undefined references for libboost_filesystem

Boost - Users mailing list

> check if the makefile uses those exports.

 

 

The Makefile is pretty straight forward (https://github.com/gpgpu-sim/ispass2009-benchmarks/tree/master/AES)

 

How can I check that?

 

 

Sent from Mail for Windows 10

 


_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Many undefined references for libboost_filesystem

Boost - Users mailing list
output the command the makefile is doing to link and check if libpath
or libs are missing or misspelled.

2017-10-15 13:02 GMT-04:00 mahmood n <[hidden email]>:

>> check if the makefile uses those exports.
>
>
>
>
>
> The Makefile is pretty straight forward
> (https://github.com/gpgpu-sim/ispass2009-benchmarks/tree/master/AES)
>
>
>
> How can I check that?
>
>
>
>
>
> Sent from Mail for Windows 10
>
>



--
Daniel
L'action accède à la perfection quand, bien que vivant, vous êtes déjà mort
Bunan
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Many undefined references for libboost_filesystem

Boost - Users mailing list

I have stuck at this error and tried many versions but they all say the same thing. The makefile is available at

 

https://github.com/gpgpu-sim/ispass2009-benchmarks

 

 

 

 

mahmood@vb:ispass2009-benchmarks$ grep BOOST Makefile.ispass-2009
           export BOOST_LIB=/home/mahmood/boost_1_54_0/stage/lib; \
           export BOOST_ROOT=/home/mahmood/boost_1_54_0; \
           export BOOST_VER=""; \
mahmood@vb:ispass2009-benchmarks$ grep boost AES/Makefile
LINKFLAGS       := -L$(BOOST_LIB) -lboost_system -lboost_filesystem$(BOOST_VER)
mahmood@vb:ispass2009-benchmarks$ make -f Makefile.ispass-2009
rm -f ../common; ln -s /home/mahmood/NVIDIA_GPU_Computing_SDK/C/common ../common;
export BINDIR=/home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/bin; export ROOTDIR=/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src/; export BINSUBDIR=release; export BOOST_LIB=/home/mahmood/boost_1_54_0/stage/lib; export BOOST_ROOT=/home/mahmood/boost_1_54_0; export BOOST_VER=""; export OPENMPI_BINDIR=/usr/bin/;  make noinline=0 -C AES
make[1]: Entering directory `/home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/AES'
obj/x86_64/release/aescuda.cpp.o: In function `_GLOBAL__sub_I_aescuda.cpp':
aescuda.cpp:(.text.startup+0x68b): undefined reference to `boost::system::get_system_category()'
aescuda.cpp:(.text.startup+0x697): undefined reference to `boost::system::get_generic_category()'
aescuda.cpp:(.text.startup+0x6a3): undefined reference to `boost::system::get_generic_category()'
aescuda.cpp:(.text.startup+0x6af): undefined reference to `boost::system::get_generic_category()'
aescuda.cpp:(.text.startup+0x6bb): undefined reference to `boost::system::get_system_category()'
obj/x86_64/release/aesCudaUtils.cpp.o: In function `boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, bool>::type boost::filesystem::exists<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)':
aesCudaUtils.cpp:(.text._ZN5boost10filesystem6existsINS0_10basic_pathISsNS0_11path_traitsEEEEENS_9enable_ifINS0_13is_basic_pathIT_EEbE4typeERKS7_[boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, bool>::type boost::filesystem::exists<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)]+0x22): undefined reference to `boost::system::get_system_category()'
aesCudaUtils.cpp:(.text._ZN5boost10filesystem6existsINS0_10basic_pathISsNS0_11path_traitsEEEEENS_9enable_ifINS0_13is_basic_pathIT_EEbE4typeERKS7_[boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, bool>::type boost::filesystem::exists<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)]+0x6b): undefined reference to `boost::filesystem::detail::status_api(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::system::error_code&)'
obj/x86_64/release/aesCudaUtils.cpp.o: In function `boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, unsigned long>::type boost::filesystem::file_size<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)':
aesCudaUtils.cpp:(.text._ZN5boost10filesystem9file_sizeINS0_10basic_pathISsNS0_11path_traitsEEEEENS_9enable_ifINS0_13is_basic_pathIT_EEmE4typeERKS7_[boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, unsigned long>::type boost::filesystem::file_size<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)]+0x55): undefined reference to `boost::filesystem::detail::file_size_api(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
obj/x86_64/release/aesCudaUtils.cpp.o: In function `_GLOBAL__sub_I_aesCudaUtils.cpp':
aesCudaUtils.cpp:(.text.startup+0x5): undefined reference to `boost::system::get_system_category()'
aesCudaUtils.cpp:(.text.startup+0x11): undefined reference to `boost::system::get_generic_category()'
aesCudaUtils..cpp:(.text.startup+0x1d): undefined reference to `boost::system::get_generic_category()'
aesCudaUtils.cpp:(.text.startup+0x29): undefined reference to `boost::system::get_generic_category()'
aesCudaUtils.cpp:(.text.startup+0x35): undefined reference to `boost::system::get_system_category()'
collect2: ld returned 1 exit status
make[1]: *** [/home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/bin/release/AES] Error 1
make[1]: Leaving directory `/home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/AES'
make: *** [default] Error 2
mahmood@vb:ispass2009-benchmarks$ ls -l /home/mahmood/boost_1_54_0/stage/lib/libboost_filesystem.*
-rw-rw-r-- 1 mahmood mahmood 213286 Oct 16 21:52 /home/mahmood/boost_1_54_0/stage/lib/libboost_filesystem.a
lrwxrwxrwx 1 mahmood mahmood     29 Oct 16 21:44 /home/mahmood/boost_1_54_0/stage/lib/libboost_filesystem.so -> libboost_filesystem.so.1.54.0
-rwxrwxr-x 1 mahmood mahmood 113400 Oct 16 21:44 /home/mahmood/boost_1_54_0/stage/lib/libboost_filesystem.so.1.54.0
mahmood@vb:ispass2009-benchmarks$ ls -l /home/mahmood/boost_1_54_0/stage/lib/libboost_system.*
-rw-rw-r-- 1 mahmood mahmood 49018 Oct 16 21:52 /home/mahmood/boost_1_54_0/stage/lib/libboost_system.a
lrwxrwxrwx 1 mahmood mahmood    25 Oct 16 21:44 /home/mahmood/boost_1_54_0/stage/lib/libboost_system.so -> libboost_system.so.1.54.0
-rwxrwxr-x 1 mahmood mahmood 20431 Oct 16 21:44 /home/mahmood/boost_1_54_0/stage/lib/libboost_system.so.1.54.0

 

 

 

Sent from Mail for Windows 10

 


_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Many undefined references for libboost_filesystem

Boost - Users mailing list
your error:
obj/x86_64/release/aescuda.cpp.o: In function `_GLOBAL__sub_I_aescuda.cpp':

what is the command producing that error ?

make is just a program executing a script file Makefile.ispass-2009

so you must find out if Makefile.ispass-2009 is trying to link, or it
may itself executing another make command.

but ultimately there is a link cmd being executing and failing (as far
as I can tell).

as I use windows, I cannot execute the makefile for you and find the
error, you'll have to walk that path by yourself, or ask a colleague.


2017-10-16 14:58 GMT-04:00 mahmood n <[hidden email]>:

> I have stuck at this error and tried many versions but they all say the same
> thing. The makefile is available at
>
>
>
> https://github.com/gpgpu-sim/ispass2009-benchmarks
>
>
>
>
>
>
>
>
>
> mahmood@vb:ispass2009-benchmarks$ grep BOOST Makefile.ispass-2009
>            export BOOST_LIB=/home/mahmood/boost_1_54_0/stage/lib; \
>            export BOOST_ROOT=/home/mahmood/boost_1_54_0; \
>            export BOOST_VER=""; \
> mahmood@vb:ispass2009-benchmarks$ grep boost AES/Makefile
> LINKFLAGS       := -L$(BOOST_LIB) -lboost_system
> -lboost_filesystem$(BOOST_VER)
> mahmood@vb:ispass2009-benchmarks$ make -f Makefile.ispass-2009
> rm -f ../common; ln -s /home/mahmood/NVIDIA_GPU_Computing_SDK/C/common
> ../common;
> export
> BINDIR=/home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/bin;
> export ROOTDIR=/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src/; export
> BINSUBDIR=release; export BOOST_LIB=/home/mahmood/boost_1_54_0/stage/lib;
> export BOOST_ROOT=/home/mahmood/boost_1_54_0; export BOOST_VER=""; export
> OPENMPI_BINDIR=/usr/bin/;  make noinline=0 -C AES
> make[1]: Entering directory
> `/home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/AES'
> obj/x86_64/release/aescuda.cpp.o: In function `_GLOBAL__sub_I_aescuda.cpp':
> aescuda.cpp:(.text.startup+0x68b): undefined reference to
> `boost::system::get_system_category()'
> aescuda.cpp:(.text.startup+0x697): undefined reference to
> `boost::system::get_generic_category()'
> aescuda.cpp:(.text.startup+0x6a3): undefined reference to
> `boost::system::get_generic_category()'
> aescuda.cpp:(.text.startup+0x6af): undefined reference to
> `boost::system::get_generic_category()'
> aescuda.cpp:(.text.startup+0x6bb): undefined reference to
> `boost::system::get_system_category()'
> obj/x86_64/release/aesCudaUtils.cpp.o: In function
> `boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char,
> std::char_traits<char>, std::allocator<char> >,
> boost::filesystem::path_traits> >, bool>::type
> boost::filesystem::exists<boost::filesystem::basic_path<std::basic_string<char,
> std::char_traits<char>, std::allocator<char> >,
> boost::filesystem::path_traits>
>>(boost::filesystem::basic_path<std::basic_string<char,
> std::char_traits<char>, std::allocator<char> >,
> boost::filesystem::path_traits> const&)':
> aesCudaUtils.cpp:(.text._ZN5boost10filesystem6existsINS0_10basic_pathISsNS0_11path_traitsEEEEENS_9enable_ifINS0_13is_basic_pathIT_EEbE4typeERKS7_[boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char,
> std::char_traits<char>, std::allocator<char> >,
> boost::filesystem::path_traits> >, bool>::type
> boost::filesystem::exists<boost::filesystem::basic_path<std::basic_string<char,
> std::char_traits<char>, std::allocator<char> >,
> boost::filesystem::path_traits>
>>(boost::filesystem::basic_path<std::basic_string<char,
> std::char_traits<char>, std::allocator<char> >,
> boost::filesystem::path_traits> const&)]+0x22): undefined reference to
> `boost::system::get_system_category()'
> aesCudaUtils.cpp:(.text._ZN5boost10filesystem6existsINS0_10basic_pathISsNS0_11path_traitsEEEEENS_9enable_ifINS0_13is_basic_pathIT_EEbE4typeERKS7_[boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char,
> std::char_traits<char>, std::allocator<char> >,
> boost::filesystem::path_traits> >, bool>::type
> boost::filesystem::exists<boost::filesystem::basic_path<std::basic_string<char,
> std::char_traits<char>, std::allocator<char> >,
> boost::filesystem::path_traits>
>>(boost::filesystem::basic_path<std::basic_string<char,
> std::char_traits<char>, std::allocator<char> >,
> boost::filesystem::path_traits> const&)]+0x6b): undefined reference to
> `boost::filesystem::detail::status_api(std::basic_string<char,
> std::char_traits<char>, std::allocator<char> > const&,
> boost::system::error_code&)'
> obj/x86_64/release/aesCudaUtils.cpp.o: In function
> `boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char,
> std::char_traits<char>, std::allocator<char> >,
> boost::filesystem::path_traits> >, unsigned long>::type
> boost::filesystem::file_size<boost::filesystem::basic_path<std::basic_string<char,
> std::char_traits<char>, std::allocator<char> >,
> boost::filesystem::path_traits>
>>(boost::filesystem::basic_path<std::basic_string<char,
> std::char_traits<char>, std::allocator<char> >,
> boost::filesystem::path_traits> const&)':
> aesCudaUtils.cpp:(.text._ZN5boost10filesystem9file_sizeINS0_10basic_pathISsNS0_11path_traitsEEEEENS_9enable_ifINS0_13is_basic_pathIT_EEmE4typeERKS7_[boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char,
> std::char_traits<char>, std::allocator<char> >,
> boost::filesystem::path_traits> >, unsigned long>::type
> boost::filesystem::file_size<boost::filesystem::basic_path<std::basic_string<char,
> std::char_traits<char>, std::allocator<char> >,
> boost::filesystem::path_traits>
>>(boost::filesystem::basic_path<std::basic_string<char,
> std::char_traits<char>, std::allocator<char> >,
> boost::filesystem::path_traits> const&)]+0x55): undefined reference to
> `boost::filesystem::detail::file_size_api(std::basic_string<char,
> std::char_traits<char>, std::allocator<char> > const&)'
> obj/x86_64/release/aesCudaUtils.cpp.o: In function
> `_GLOBAL__sub_I_aesCudaUtils.cpp':
> aesCudaUtils.cpp:(.text.startup+0x5): undefined reference to
> `boost::system::get_system_category()'
> aesCudaUtils.cpp:(.text.startup+0x11): undefined reference to
> `boost::system::get_generic_category()'
> aesCudaUtils..cpp:(.text.startup+0x1d): undefined reference to
> `boost::system::get_generic_category()'
> aesCudaUtils.cpp:(.text.startup+0x29): undefined reference to
> `boost::system::get_generic_category()'
> aesCudaUtils.cpp:(.text.startup+0x35): undefined reference to
> `boost::system::get_system_category()'
> collect2: ld returned 1 exit status
> make[1]: ***
> [/home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/bin/release/AES]
> Error 1
> make[1]: Leaving directory
> `/home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/AES'
> make: *** [default] Error 2
> mahmood@vb:ispass2009-benchmarks$ ls -l
> /home/mahmood/boost_1_54_0/stage/lib/libboost_filesystem.*
> -rw-rw-r-- 1 mahmood mahmood 213286 Oct 16 21:52
> /home/mahmood/boost_1_54_0/stage/lib/libboost_filesystem.a
> lrwxrwxrwx 1 mahmood mahmood     29 Oct 16 21:44
> /home/mahmood/boost_1_54_0/stage/lib/libboost_filesystem.so ->
> libboost_filesystem.so.1.54.0
> -rwxrwxr-x 1 mahmood mahmood 113400 Oct 16 21:44
> /home/mahmood/boost_1_54_0/stage/lib/libboost_filesystem.so.1.54.0
> mahmood@vb:ispass2009-benchmarks$ ls -l
> /home/mahmood/boost_1_54_0/stage/lib/libboost_system.*
> -rw-rw-r-- 1 mahmood mahmood 49018 Oct 16 21:52
> /home/mahmood/boost_1_54_0/stage/lib/libboost_system.a
> lrwxrwxrwx 1 mahmood mahmood    25 Oct 16 21:44
> /home/mahmood/boost_1_54_0/stage/lib/libboost_system.so ->
> libboost_system.so.1.54.0
> -rwxrwxr-x 1 mahmood mahmood 20431 Oct 16 21:44
> /home/mahmood/boost_1_54_0/stage/lib/libboost_system.so.1.54.0
>
>
>
>
>
>
>
> Sent from Mail for Windows 10
>
>



--
Daniel
L'action accède à la perfection quand, bien que vivant, vous êtes déjà mort
Bunan
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Many undefined references for libboost_filesystem

Boost - Users mailing list
In reply to this post by Boost - Users mailing list


On Mon, 16 Oct 2017 at 14:58 mahmood n via Boost-users <[hidden email]> wrote:

mahmood@vb:ispass2009-benchmarks$ grep BOOST Makefile.ispass-2009
           export BOOST_LIB=/home/mahmood/boost_1_54_0/stage/lib; \
           export BOOST_ROOT=/home/mahmood/boost_1_54_0; \
           export BOOST_VER=""; \
mahmood@vb:ispass2009-benchmarks$ grep boost AES/Makefile
LINKFLAGS       := -L$(BOOST_LIB) -lboost_system -lboost_filesystem$(BOOST_VER)
mahmood@vb:ispass2009-benchmarks$ make -f Makefile.ispass-2009
rm -f ../common; ln -s /home/mahmood/NVIDIA_GPU_Computing_SDK/C/common ../common;
export BINDIR=/home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/bin; export ROOTDIR=/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src/; export BINSUBDIR=release; export BOOST_LIB=/home/mahmood/boost_1_54_0/stage/lib; export BOOST_ROOT=/home/mahmood/boost_1_54_0; export BOOST_VER=""; export OPENMPI_BINDIR=/usr/bin/;  make noinline=0 -C AES


make[1]: Entering directory `/home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/AES'
obj/x86_64/release/aescuda.cpp.o: In function `_GLOBAL__sub_I_aescuda.cpp':
aescuda.cpp:(.text.startup+0x68b): undefined reference to `boost::system::get_system_category()'
aescuda.cpp:(.text.startup+0x697): undefined reference to `boost::system::get_generic_category()'
aescuda.cpp:(.text.startup+0x6a3): undefined reference to `boost::system::get_generic_category()'
aescuda.cpp:(.text.startup+0x6af): undefined reference to `boost::system::get_generic_category()'
aescuda.cpp:(.text.startup+0x6bb): undefined reference to `boost::system::get_system_category()'

The error is in an undefined reference to a symbol in boost.system. Because of the way GCC links, the order matters as anything not referenced up to that point is removed.

Try changing this line:

LINKFLAGS       := -L$(BOOST_LIB) -lboost_system -lboost_filesystem$(BOOST_VER) 

To 

 LINKFLAGS       := -L$(BOOST_LIB) -lboost_filesystem$(BOOST_VER) -lboost_system 

IE: Switch the order of system and filesystem.

Hope this helps,

-- chris


_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Many undefined references for libboost_filesystem

Boost - Users mailing list
>Try changing this line:
>
>LINKFLAGS       := -L$(BOOST_LIB) -lboost_system -lboost_filesystem$(BOOST_VER) 
>
>To 
>
> LINKFLAGS       := -L$(BOOST_LIB) -lboost_filesystem$(BOOST_VER) -lboost_system 




Hi Chris,
It is a very nasty error and I have resolved many such errors by putting the right library names and fixing Makefiles. However, I don't know why I cannot cope with this one! I changed the order but still get the same error.


$(SETENV) make noinline=$(noinline) -C AES

So that enters AES/ and builds that. We see


mahmood@vb:ispass2009-benchmarks$ make -f Makefile.ispass-2009
rm -f ../common; ln -s /home/mahmood/NVIDIA_GPU_Computing_SDK/C/common ../common;
export BINDIR=/home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/bin; export ROOTDIR=/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src/; export BINSUBDIR=release; export BOOST_LIB=/home/mahmood/boost_1_54_0/stage/lib; export BOOST_ROOT=/home/mahmood/boost_1_54_0; export BOOST_VER=""; export OPENMPI_BINDIR=/usr/bin/;  make noinline=0 -C AES

make[1]: Entering directory `/home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/AES'
obj/x86_64/release/aescuda.cpp.o: In function `_GLOBAL__sub_I_aescuda.cpp':
aescuda.cpp:(.text.startup+0x68b): undefined reference to `boost::system::get_system_category()'

...


In AES/ the Makefile is https://github.com/gpgpu-sim/ispass2009-benchmarks/blob/master/AES/Makefile which only sets the FLAGS.


That file includes a common.mk for rules and targets. It is a 500 line file
I am trying to find the exact command that builds aescuda.cpp.o. I think it is


$(OBJDIR(/%.cpp.o : $(SRCDIR)%.cpp $(C_DEPS)
       $(VERBOSE)$(CXX) $(CXXFLAGS) -o $@ -c $<



So, I think something is missing here that the library file is missed.


Regards,
Mahmood

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Many undefined references for libboost_filesystem

Boost - Users mailing list

On 17 October 2017 08:38
Mahmood N [mailto:[hidden email]] wrote:


>$(OBJDIR(/%.cpp.o : $(SRCDIR)%.cpp $(C_DEPS)
>       $(VERBOSE)$(CXX) $(CXXFLAGS) -o $@ -c $<

Whilst this isn't really anything to do with boost per se I feel your pain having inherited various "clever" makefile solutions in my career.

That looks like the compile line (ie building the .o files) rather than the link line - however having $(VERBOSE) in front looks promising

I imagine that is set to @ which is an "echo off" style feature in make - ie only outputs the output of the command to stdout and not the actual invocation.

If you switch that off you can probably get make to output the actual commands it is using - then you can see what exactly is happening rather than having to guess.

How $(VERBOSE) gets set will be specific to that particular makefile / nest of makefiles - possibly there is some command line parameter checked when you call them which sets this for you (DEBUG=ON used to be a common convention).

If you can't determine that then try forcing VERBOSE to be blank or if all else fails edit the makefile to remove $(VERBOSE) from the calling of the linker (which is probably done using $(CXX) without the -o flag)


One other thing that can help with debugging makefiles is add a debug target

.PHONY: debug
# to debug variables
#  copy this to a makefile and use via command line
#  make V="CFLAGS ANOVAR" debug
debug:
        $(foreach v,$(V), \
          $(warning $v = $($v)))


Which is just adding a target "debug" to make which outputs the make variables you pass in by V

make V="VERBOSE BOOST_LIB" debug

So you are telling make to build target "debug" and that will simply output the name and value of the variables you have passed.

There are limitations to this technique since some variables in make can alter their values depending on stage of processing (basically the difference between A := VALUE and A = VALUE in a makefile) but sometimes it saves a lot of time and head scratching.

HTH
Alex
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Many undefined references for libboost_filesystem

Boost - Users mailing list

 

So, I finally found how to see the invoked command! In the common.mk file, I saw

 

# check if verbose

ifeq ($(verbose), 1)

        VERBOSE :=

else

        VERBOSE := @

Endif

 

With an ugly workaround, I changed it to

 

# check if verbose

ifeq ($(verbose), 1)

        VERBOSE :=

else

        VERBOSE :=

endif

 

 

 

I didn’t want to have another pain for “finding how the verbose variable is set in the Makefile”!!!

 

 

 

 

Here is the full output with the command. The libraries do exist, so why on earth it can not link :(

 

mahmood@vb:AES$ g++ -fPIC -L/home/mahmood/boost_1_54_0/stage/lib -lboost_filesystem -lboost_system  -m64 -o /home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/bin/release/AES   obj/x86_64/release/aescuda.cpp.o obj/x86_64/release/aesCudaUtils.cpp.o  obj/x86_64/release/aesHost.cu.o        -L/usr/local/cuda/lib64 -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../lib -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../common/lib/linux -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../../shared//lib -lcudart    -L/usr/local/cuda/lib64 -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../lib -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../common/lib/linux -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../../shared//lib -lcudart -lcutil_x86_64  -lshrutil_x86_64

obj/x86_64/release/aescuda.cpp.o: In function `_GLOBAL__sub_I_aescuda.cpp':

aescuda.cpp:(.text.startup+0x68b): undefined reference to `boost::system::get_system_category()'

aescuda.cpp:(.text.startup+0x697): undefined reference to `boost::system::get_generic_category()'

aescuda.cpp:(.text.startup+0x6a3): undefined reference to `boost::system::get_generic_category()'

aescuda.cpp:(.text.startup+0x6af): undefined reference to `boost::system::get_generic_category()'

aescuda.cpp:(.text.startup+0x6bb): undefined reference to `boost::system::get_system_category()'

obj/x86_64/release/aesCudaUtils.cpp.o: In function `boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, bool>::type boost::filesystem::exists<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)':

aesCudaUtils.cpp:(.text._ZN5boost10filesystem6existsINS0_10basic_pathISsNS0_11path_traitsEEEEENS_9enable_ifINS0_13is_basic_pathIT_EEbE4typeERKS7_[boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, bool>::type boost::filesystem::exists<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)]+0x22): undefined reference to `boost::system::get_system_category()'

aesCudaUtils.cpp:(.text._ZN5boost10filesystem6existsINS0_10basic_pathISsNS0_11path_traitsEEEEENS_9enable_ifINS0_13is_basic_pathIT_EEbE4typeERKS7_[boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, bool>::type boost::filesystem::exists<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)]+0x6b): undefined reference to `boost::filesystem::detail::status_api(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::system::error_code&)'

obj/x86_64/release/aesCudaUtils.cpp.o: In function `boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, unsigned long>::type boost::filesystem::file_size<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)':

aesCudaUtils.cpp:(.text._ZN5boost10filesystem9file_sizeINS0_10basic_pathISsNS0_11path_traitsEEEEENS_9enable_ifINS0_13is_basic_pathIT_EEmE4typeERKS7_[boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, unsigned long>::type boost::filesystem::file_size<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)]+0x55): undefined reference to `boost::filesystem::detail::file_size_api(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'

obj/x86_64/release/aesCudaUtils.cpp.o: In function `_GLOBAL__sub_I_aesCudaUtils.cpp':

aesCudaUtils.cpp:(.text.startup+0x5): undefined reference to `boost::system::get_system_category()'

aesCudaUtils.cpp:(.text.startup+0x11): undefined reference to `boost::system::get_generic_category()'

aesCudaUtils.cpp:(.text.startup+0x1d): undefined reference to `boost::system::get_generic_category()'

aesCudaUtils.cpp:(.text.startup+0x29): undefined reference to `boost::system::get_generic_category()'

aesCudaUtils.cpp:(.text.startup+0x35): undefined reference to `boost::system::get_system_category()'

collect2: ld returned 1 exit status

mahmood@vb:AES$ ls /home/mahmood/boost_1_54_0/stage/lib/libboost_system.*

/home/mahmood/boost_1_54_0/stage/lib/libboost_system.a

/home/mahmood/boost_1_54_0/stage/lib/libboost_system.so

/home/mahmood/boost_1_54_0/stage/lib/libboost_system.so.1.54.0

mahmood@vb:AES$ ls /home/mahmood/boost_1_54_0/stage/lib/libboost_filesystem.*

/home/mahmood/boost_1_54_0/stage/lib/libboost_filesystem.a

/home/mahmood/boost_1_54_0/stage/lib/libboost_filesystem.so

/home/mahmood/boost_1_54_0/stage/lib/libboost_filesystem.so.1.54.0

mahmood@vb:AES$

 

 

 

 

 

 

 

 

Sent from Mail for Windows 10

 


_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Many undefined references for libboost_filesystem

Boost - Users mailing list

 

 

From: Boost-users [mailto:[hidden email]] On Behalf Of mahmood n via Boost-users
Sent: 17 October 2017 15:23
To: Alex Perry; [hidden email]
Cc: mahmood n
Subject: Re: [Boost-users] Many undefined references for libboost_filesystem

 

 

So, I finally found how to see the invoked command!

 

Here is the full output with the command. The libraries do exist, so why on earth it can not link :(

 

 

 

mahmood@vb:AES$ g++ -fPIC -L/home/mahmood/boost_1_54_0/stage/lib -lboost_filesystem -lboost_system  -m64 -o /home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/bin/release/AES   obj/x86_64/release/aescuda.cpp.o obj/x86_64/release/aesCudaUtils.cpp.o  obj/x86_64/release/aesHost.cu.o        -L/usr/local/cuda/lib64 -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../lib -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../common/lib/linux -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../../shared//lib -lcudart    -L/usr/local/cuda/lib64 -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../lib -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../common/lib/linux -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../../shared//lib -lcudart -lcutil_x86_64  -lshrutil_x86_64

 

Does adding –v option (verbose) to this line tell you anything helpful?

(like the directories it is searching?  - or, more likely, not searching ;-)  )

 

Paul

 

 

---

Paul A. Bristow

Prizet Farmhouse

Kendal UK LA8 8AB

+44 (0) 1539 561830

 

 

 

obj/x86_64/release/aescuda.cpp.o: In function `_GLOBAL__sub_I_aescuda.cpp':

aescuda.cpp:(.text.startup+0x68b): undefined reference to `boost::system::get_system_category()'

aescuda.cpp:(.text.startup+0x697): undefined reference to `boost::system::get_generic_category()'

aescuda.cpp:(.text.startup+0x6a3): undefined reference to `boost::system::get_generic_category()'

aescuda.cpp:(.text.startup+0x6af): undefined reference to `boost::system::get_generic_category()'

aescuda.cpp:(.text.startup+0x6bb): undefined reference to `boost::system::get_system_category()'

obj/x86_64/release/aesCudaUtils.cpp.o: In function `boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, bool>::type boost::filesystem::exists<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)':

aesCudaUtils.cpp:(.text._ZN5boost10filesystem6existsINS0_10basic_pathISsNS0_11path_traitsEEEEENS_9enable_ifINS0_13is_basic_pathIT_EEbE4typeERKS7_[boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, bool>::type boost::filesystem::exists<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)]+0x22): undefined reference to `boost::system::get_system_category()'

aesCudaUtils.cpp:(.text._ZN5boost10filesystem6existsINS0_10basic_pathISsNS0_11path_traitsEEEEENS_9enable_ifINS0_13is_basic_pathIT_EEbE4typeERKS7_[boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, bool>::type boost::filesystem::exists<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)]+0x6b): undefined reference to `boost::filesystem::detail::status_api(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::system::error_code&)'

obj/x86_64/release/aesCudaUtils.cpp.o: In function `boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, unsigned long>::type boost::filesystem::file_size<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)':

aesCudaUtils.cpp:(.text._ZN5boost10filesystem9file_sizeINS0_10basic_pathISsNS0_11path_traitsEEEEENS_9enable_ifINS0_13is_basic_pathIT_EEmE4typeERKS7_[boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, unsigned long>::type boost::filesystem::file_size<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)]+0x55): undefined reference to `boost::filesystem::detail::file_size_api(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'

obj/x86_64/release/aesCudaUtils.cpp.o: In function `_GLOBAL__sub_I_aesCudaUtils.cpp':

aesCudaUtils.cpp:(.text.startup+0x5): undefined reference to `boost::system::get_system_category()'

aesCudaUtils.cpp:(.text.startup+0x11): undefined reference to `boost::system::get_generic_category()'

aesCudaUtils.cpp:(.text.startup+0x1d): undefined reference to `boost::system::get_generic_category()'

aesCudaUtils.cpp:(.text.startup+0x29): undefined reference to `boost::system::get_generic_category()'

aesCudaUtils.cpp:(.text.startup+0x35): undefined reference to `boost::system::get_system_category()'

collect2: ld returned 1 exit status

mahmood@vb:AES$ ls /home/mahmood/boost_1_54_0/stage/lib/libboost_system.*

/home/mahmood/boost_1_54_0/stage/lib/libboost_system.a

/home/mahmood/boost_1_54_0/stage/lib/libboost_system.so

/home/mahmood/boost_1_54_0/stage/lib/libboost_system.so.1.54.0

mahmood@vb:AES$ ls /home/mahmood/boost_1_54_0/stage/lib/libboost_filesystem.*

/home/mahmood/boost_1_54_0/stage/lib/libboost_filesystem.a

/home/mahmood/boost_1_54_0/stage/lib/libboost_filesystem.so

/home/mahmood/boost_1_54_0/stage/lib/libboost_filesystem.so.1.54.0

mahmood@vb:AES$

 

 

 

 

 

 

 

 

Sent from Mail for Windows 10

 


_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Many undefined references for libboost_filesystem

Boost - Users mailing list

>Does adding –v option (verbose) to this line tell you anything helpful?

>(like the directories it is searching?  - or, more likely, not searching ;-)  )

 

 

 

Here it is. I don’t see anything useful in the verbose output. Do you?

 

 

mahmood@vb:AES$ g++ -v -fPIC -L/home/mahmood/boost_1_54_0/stage/lib -lboost_filesystem   -m64 -o /home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/bin/release/AES   obj/x86_64/release/aescuda.cpp.o obj/x86_64/release/aesCudaUtils.cpp.o  obj/x86_64/release/aesHost.cu.o        -L/usr/local/cuda/lib64 -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../lib -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../common/lib/linux -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../../shared//lib -lcudart    -L/usr/local/cuda/lib64 -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../lib -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../common/lib/linux -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../../shared//lib -lcudart -lcutil_x86_64  -lshrutil_x86_64

Using built-in specs.

COLLECT_GCC=g++

COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper

Target: x86_64-linux-gnu

Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu

Thread model: posix

gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)

COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.6/:/usr/lib/gcc/x86_64-linux-gnu/4.6/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.6/:/usr/lib/gcc/x86_64-linux-gnu/

LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.6/:/usr/lib/gcc/x86_64-linux-gnu/4.6/../../.../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../:/lib/:/usr/lib/

COLLECT_GCC_OPTIONS='-v' '-fPIC' '-L/home/mahmood/boost_1_54_0/stage/lib' '-m64' '-o' '/home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/bin/release/AES' '-L/usr/local/cuda/lib64' '-L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../lib' '-L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../common/lib/linux' '-L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../../shared//lib' '-L/usr/local/cuda/lib64' '-L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../lib' '-L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../common/lib/linux' '-L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../../shared//lib' '-shared-libgcc' '-mtune=generic' '-march=x86-64'

/usr/lib/gcc/x86_64-linux-gnu/4.6/collect2 --sysroot=/ --build-id --no-add-needed --as-needed --eh-frame-hdr -m elf_x86_64 --hash-style=gnu -dynamic-linker /lib64/ld-linux-x86-64..so.2 -z relro -o /home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/bin/release/AES /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.6/crtbegin.o -L/home/mahmood/boost_1_54_0/stage/lib -L/usr/local/cuda/lib64 -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../lib -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../common/lib/linux -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../../shared//lib -L/usr/local/cuda/lib64 -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../lib -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../common/lib/linux -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../../shared//lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6 -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../.. -lboost_filesystem obj/x86_64/release/aescuda.cpp.o obj/x86_64/release/aesCudaUtils.cpp.o obj/x86_64/release/aesHost.cu.o -lcudart -lcudart -lcutil_x86_64 -lshrutil_x86_64 -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/4.6/crtend.o /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crtn.o

obj/x86_64/release/aescuda.cpp.o: In function `_GLOBAL__sub_I_aescuda.cpp':

aescuda.cpp:(.text.startup+0x68b): undefined reference to `boost::system::get_system_category()'

….

 

 

 

 

Sent from Mail for Windows 10

 


_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Many undefined references for libboost_filesystem

Boost - Users mailing list
is it possible the gcc linker is not finding the proper lib file ?

all look good, I assume that the linker is add lib in front of the
name of your argument, does it add suffix also ?

look for an option to get the list of libs it found when trying to link.

2 thinks can happen:

the lib name is not the one you think (in windows they have .lib
extension, not .so)
it finds another lib with the same name in another directory.

you have the link cmd, use it directly it will be easier maybe to find
your problem

make sure you understand all the options use for linking, your problem
could be there also.


2017-10-17 12:50 GMT-04:00 mahmood n via Boost-users
<[hidden email]>:

>>Does adding –v option (verbose) to this line tell you anything helpful?
>
>>(like the directories it is searching?  - or, more likely, not searching
>> ;-)  )
>
>
>
>
>
>
>
> Here it is. I don’t see anything useful in the verbose output. Do you?
>
>
>
>
>
> mahmood@vb:AES$ g++ -v -fPIC -L/home/mahmood/boost_1_54_0/stage/lib
> -lboost_filesystem   -m64 -o
> /home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/bin/release/AES
> obj/x86_64/release/aescuda.cpp.o obj/x86_64/release/aesCudaUtils.cpp.o
> obj/x86_64/release/aesHost.cu.o        -L/usr/local/cuda/lib64
> -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../lib
> -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../common/lib/linux
> -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../../shared//lib -lcudart
> -L/usr/local/cuda/lib64
> -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../lib
> -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../common/lib/linux
> -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../../shared//lib -lcudart
> -lcutil_x86_64  -lshrutil_x86_64
>
> Using built-in specs.
>
> COLLECT_GCC=g++
>
> COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper
>
> Target: x86_64-linux-gnu
>
> Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
> 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs
> --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
> --program-suffix=-4.6 --enable-shared --enable-linker-build-id
> --with-system-zlib --libexecdir=/usr/lib --without-included-gettext
> --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6
> --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
> --enable-libstdcxx-debug --enable-libstdcxx-time=yes
> --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror
> --with-arch-32=i686 --with-tune=generic --enable-checking=release
> --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
>
> Thread model: posix
>
> gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
>
> COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.6/:/usr/lib/gcc/x86_64-linux-gnu/4.6/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.6/:/usr/lib/gcc/x86_64-linux-gnu/
>
> LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.6/:/usr/lib/gcc/x86_64-linux-gnu/4.6/../../.../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../:/lib/:/usr/lib/
>
> COLLECT_GCC_OPTIONS='-v' '-fPIC' '-L/home/mahmood/boost_1_54_0/stage/lib'
> '-m64' '-o'
> '/home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/bin/release/AES'
> '-L/usr/local/cuda/lib64'
> '-L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../lib'
> '-L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../common/lib/linux'
> '-L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../../shared//lib'
> '-L/usr/local/cuda/lib64'
> '-L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../lib'
> '-L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../common/lib/linux'
> '-L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../../shared//lib'
> '-shared-libgcc' '-mtune=generic' '-march=x86-64'
>
> /usr/lib/gcc/x86_64-linux-gnu/4.6/collect2 --sysroot=/ --build-id
> --no-add-needed --as-needed --eh-frame-hdr -m elf_x86_64 --hash-style=gnu
> -dynamic-linker /lib64/ld-linux-x86-64..so.2 -z relro -o
> /home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/bin/release/AES
> /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crt1.o
> /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crti.o
> /usr/lib/gcc/x86_64-linux-gnu/4.6/crtbegin.o
> -L/home/mahmood/boost_1_54_0/stage/lib -L/usr/local/cuda/lib64
> -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../lib
> -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../common/lib/linux
> -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../../shared//lib
> -L/usr/local/cuda/lib64
> -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../lib
> -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../common/lib/linux
> -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../../shared//lib
> -L/usr/lib/gcc/x86_64-linux-gnu/4.6
> -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu
> -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib -L/lib/x86_64-linux-gnu
> -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib
> -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../.. -lboost_filesystem
> obj/x86_64/release/aescuda.cpp.o obj/x86_64/release/aesCudaUtils.cpp.o
> obj/x86_64/release/aesHost.cu.o -lcudart -lcudart -lcutil_x86_64
> -lshrutil_x86_64 -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc
> /usr/lib/gcc/x86_64-linux-gnu/4.6/crtend.o
> /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crtn.o
>
> obj/x86_64/release/aescuda.cpp.o: In function `_GLOBAL__sub_I_aescuda.cpp':
>
> aescuda.cpp:(.text.startup+0x68b): undefined reference to
> `boost::system::get_system_category()'
>
> ….
>
>
>
>
>
>
>
>
>
> Sent from Mail for Windows 10
>
>
>
>
> _______________________________________________
> Boost-users mailing list
> [hidden email]
> https://lists.boost.org/mailman/listinfo.cgi/boost-users



--
Daniel
L'action accède à la perfection quand, bien que vivant, vous êtes déjà mort
Bunan
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Many undefined references for libboost_filesystem

Boost - Users mailing list
In reply to this post by Boost - Users mailing list

I used another gcc version 4.5 (Ubuntu 11.04) and it works without any problem!

I don’t know what is wrong with gcc-4.6. Though the problematic platform was Kubuntuu 12.04.

I am know trying with Ubuntu 12.04 which uses gcc-4.6 to see if it is really a gcc problem or the platform!

 

 

Sent from Mail for Windows 10

 

From: [hidden email]
Sent: Wednesday, October 18, 2017 4:45 PM
To: [hidden email]
Subject: RE: [Boost-users] Many undefined references for libboost_filesystem

 

Actually one other thought (though you may well have solved this by now).

 

Are you sure that the boost libraries you are attempting to link to are using the same abi?

 

Ie how were they built.

 

I only glanced at the github stuff you pointed too but I think I remember that the last commit was 5 years ago or some such – so probably wasn’t using C++11.

 

I note you are using an old (54) version of boost whilst the current is (65) so about 5 years ago as well – but that probably supported being built with c++11.so you might need to rebuild them if they were using a different version of the C++ standard (or any abi breaking change such as 32 vs 64 bit, static runtime vs dynamically loaded etc).

 

Under windows boost normally encodes the abi into the library name and you just automagically (using a msvc extension) link to the appropriate one.  That is not the normal way on linux since gcc doesn’t have autolinking so you normally end up sticking them into a separate lib directory and swapping the -L path depending on which abi you want

 

Again though please note this is not boost specific – is just standard C / C++ / Fortran or any obj/link based language issues with building dependencies – (and why most have swapped to using cmake rather than vanilla make to avoid the pain).

 

A.

 

From: Alex Perry
Sent: 17 October 2017 16:14
To: 'mahmood n' <[hidden email]>
Subject: RE: [Boost-users] Many undefined references for libboost_filesystem

 

Dropped the rest of the boost list since I’m sure not many are interested!

 

> I didn’t want to have another pain for “finding how the verbose variable is set in the Makefile”!!!

 

Not hard that one… just add it to the command line when you call make

 

make verbose=1 …..

 

 

> The libraries do exist, so why on earth it can not link :(

> mahmood@vb:AES$ g++ -fPIC -L/home/mahmood/boost_1_54_0/stage/lib -lboost_filesystem -lboost_system  -m64 -o /home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/bin/release/AES   obj/x86_64/release/aescuda.cpp.o obj/x86_64/release/aesCudaUtils.cpp.o  obj/x86_64/release/aesHost.cu.o        -L/usr/local/cuda/lib64 -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../lib -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../common/lib/linux -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../../shared//lib -lcudart    -L/usr/local/cuda/lib64 -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../lib -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../common/lib/linux -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../../shared//lib -lcudart -lcutil_x86_64  -lshrutil_x86_64

 

….

 

Nope the computer is telling you they don’t exist on those paths as given – unfortunately the computer is more likely to be correct than you on this!

 

You have a lot of library paths being set there – possibly you have multiple versions of boost libraries so its finding the wrong one first so you have a version conflict

 

Possibly the simplest way is create a noddy test and play with the command line till you work out what the problem is

 

http://rextester.com/live/JDVHT54458

 

That will give you similar compile errors without -lboost_filesystem -lboost_system added to the compile line.

 

Obviously that is using clang rather than gcc which you are using but the syntax and principles are pretty much the same between any c++ compiler

 

HTH

 

A.

 


_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Many undefined references for libboost_filesystem

Boost - Users mailing list

Glad to hear you’ve made progress - these things can be frustrating to say the least….

 

I can’t really remember the issues for old gcc versions (it was 5 years or so ago since I last used 4.x gcc) but there are resources listing abi breakages https://gcc.gnu.org/wiki/Cxx11AbiCompatibility as far as I can remember it was just best to recompile all dependencies making sure the compiler flags didn’t ever differ – later gcc’s were better for this but using clang became our preferred solution.

 

Once you’ve gone down the line of rebuilding every dep then you may as well use a newer compiler rather than the one used by the particular linux packager.

 

It does mean you can’t just apt-get X-devel to get X (since that will be built with the wrong compiler and so may or may not work but regardless is a risk) which is a slight pain – but tbh linux packages are always a bit of a hacky solution and don’t fit well with anyone who is building software x-platform (or even X-linux variants)– ie they may make life a bit simpler for a trivial case but generally you need to control how all parts of your solution are built and short cuts like pre-built binaries tend to come back to bite you eventually.

 

A.

From: mahmood n [mailto:[hidden email]]
Sent: 19 October 2017 07:59
To: Alex Perry <[hidden email]>
Cc: [hidden email]
Subject: RE: [Boost-users] Many undefined references for libboost_filesystem

 

I used another gcc version 4.5 (Ubuntu 11.04) and it works without any problem!

I don’t know what is wrong with gcc-4.6. Though the problematic platform was Kubuntuu 12.04.

I am know trying with Ubuntu 12.04 which uses gcc-4.6 to see if it is really a gcc problem or the platform!

 

 

Sent from Mail for Windows 10

 

From: [hidden email]
Sent: Wednesday, October 18, 2017 4:45 PM
To: [hidden email]
Subject: RE: [Boost-users] Many undefined references for libboost_filesystem

 

Actually one other thought (though you may well have solved this by now).

 

Are you sure that the boost libraries you are attempting to link to are using the same abi?

 

Ie how were they built.

 

I only glanced at the github stuff you pointed too but I think I remember that the last commit was 5 years ago or some such – so probably wasn’t using C++11.

 

I note you are using an old (54) version of boost whilst the current is (65) so about 5 years ago as well – but that probably supported being built with c++11.so you might need to rebuild them if they were using a different version of the C++ standard (or any abi breaking change such as 32 vs 64 bit, static runtime vs dynamically loaded etc).

 

Under windows boost normally encodes the abi into the library name and you just automagically (using a msvc extension) link to the appropriate one.  That is not the normal way on linux since gcc doesn’t have autolinking so you normally end up sticking them into a separate lib directory and swapping the -L path depending on which abi you want

 

Again though please note this is not boost specific – is just standard C / C++ / Fortran or any obj/link based language issues with building dependencies – (and why most have swapped to using cmake rather than vanilla make to avoid the pain).

 

A.

 

From: Alex Perry
Sent: 17 October 2017 16:14
To: 'mahmood n' <[hidden email]>
Subject: RE: [Boost-users] Many undefined references for libboost_filesystem

 

Dropped the rest of the boost list since I’m sure not many are interested!

 

> I didn’t want to have another pain for “finding how the verbose variable is set in the Makefile”!!!

 

Not hard that one… just add it to the command line when you call make

 

make verbose=1 …..

 

 

> The libraries do exist, so why on earth it can not link :(

> mahmood@vb:AES$ g++ -fPIC -L/home/mahmood/boost_1_54_0/stage/lib -lboost_filesystem -lboost_system  -m64 -o /home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/bin/release/AES   obj/x86_64/release/aescuda.cpp.o obj/x86_64/release/aesCudaUtils.cpp.o  obj/x86_64/release/aesHost.cu.o        -L/usr/local/cuda/lib64 -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../lib -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../common/lib/linux -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../../shared//lib -lcudart    -L/usr/local/cuda/lib64 -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../lib -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../common/lib/linux -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/src//../../shared//lib -lcudart -lcutil_x86_64  -lshrutil_x86_64

 

….

 

Nope the computer is telling you they don’t exist on those paths as given – unfortunately the computer is more likely to be correct than you on this!

 

You have a lot of library paths being set there – possibly you have multiple versions of boost libraries so its finding the wrong one first so you have a version conflict

 

Possibly the simplest way is create a noddy test and play with the command line till you work out what the problem is

 

http://rextester.com/live/JDVHT54458

 

That will give you similar compile errors without -lboost_filesystem -lboost_system added to the compile line.

 

Obviously that is using clang rather than gcc which you are using but the syntax and principles are pretty much the same between any c++ compiler

 

HTH

 

A.

 


_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Many undefined references for libboost_filesystem

Boost - Users mailing list
In reply to this post by Boost - Users mailing list

From: Boost-users [mailto:[hidden email]] On Behalf Of mahmood n via Boost-users
Sent: 19 October 2017 07:59
To: Alex Perry
Cc: mahmood n; [hidden email]
Subject: Re: [Boost-users] Many undefined references for libboost_filesystem

 

I used another gcc version 4.5 (Ubuntu 11.04) and it works without any problem!

I don’t know what is wrong with gcc-4.6. Though the problematic platform was Kubuntuu 12.04.

I am know trying with Ubuntu 12.04 which uses gcc-4.6 to see if it is really a gcc problem or the platform!

 

Good luck.

 

But as a PS, I’m puzzled that you are using such old software, both GCC (on version 7) and Boost (on 1.65) – and Ubuntu too (on 16.04), known to be riddled with many Old Bugs.

 

I would have thought that you would be much better off without those bugs (even if that adds a few New Bugs) by starting with all new current software.  (If management objects, tell them there is a price for using obsolete software, and you are paying it now).

 

Paul

---

Paul A. Bristow

Prizet Farmhouse

Kendal UK LA8 8AB

+44 (0) 1539 561830

 

 

 

 


_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
12