Dolfin build can't find armadillo
I'm trying to build dolfin on arch linux. The build fails trying to find armadillo. I've copied the armadillo test file and can compile it with clang++ test.cpp -llapack -lblas -L /usr/local/lib -larmadillo. I can't get cmake to use the correct flags. How do I give the correct flags to cmake? Thanks.
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Revision history for this message
|
#1 |
Hi Derek,
Derek Thomas writes:
> New question #206520 on FEniCS Project:
> https:/
>
> I'm trying to build dolfin on arch linux. The build fails trying to
> find armadillo. I've copied the armadillo test file and can compile
> it with clang++ test.cpp -llapack -lblas -L /usr/local/lib
> -larmadillo. I can't get cmake to use the correct flags. How do I
> give the correct flags into cmake? Thanks.
Are you using packages from the AUR? Do you have $TRILINOS_DIR set?
Myles
Revision history for this message
|
#2 |
Yes, it's set to /usr. The problem seems to be that the cmake test
doesn't include /usr/local/lib, the location of libarmadillo.so.
On Wed, Aug 22, 2012 at 4:26 PM, Myles English
<email address hidden> wrote:
> Your question #206520 on FEniCS Project changed:
> https:/
>
> Status: Open => Answered
>
> Myles English proposed the following answer:
>
> Hi Derek,
>
> Derek Thomas writes:
>
>> New question #206520 on FEniCS Project:
>> https:/
>>
>> I'm trying to build dolfin on arch linux. The build fails trying to
>> find armadillo. I've copied the armadillo test file and can compile
>> it with clang++ test.cpp -llapack -lblas -L /usr/local/lib
>> -larmadillo. I can't get cmake to use the correct flags. How do I
>> give the correct flags into cmake? Thanks.
>
> Are you using packages from the AUR? Do you have $TRILINOS_DIR set?
>
> Myles
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https:/
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https:/
>
> You received this question notification because you asked the question.
Revision history for this message
|
#3 |
Derek Thomas writes:
> Derek Thomas is still having a problem:
> Yes, it's set to /usr. The problem seems to be that the cmake test
> doesn't include /usr/local/lib, the location of libarmadillo.so.
Okay, and if it turns out that the problem is elsewhere then may be this
bug is relevant?:
http://
> On Wed, Aug 22, 2012 at 4:26 PM, Myles English
>> Are you using packages from the AUR? Do you have $TRILINOS_DIR set?
For some reason, every time I read 'Armadillo', my brain says
'Trilinos'.
You don't say if you are using the AUR package scripts, but if you need
anything adding to the package build let me know.
Myles
Revision history for this message
|
#4 |
I'm using the aur tarball with makepkg. Right now I'm trying to
figure out what to add to the cmake command so that it recognizes that
armadillo is installed. Setting armadillo_dir with a
-DARMADILLO_
other ideas? Thanks,
Derek
On Wed, Aug 22, 2012 at 5:56 PM, Myles English
<email address hidden> wrote:
> Your question #206520 on FEniCS Project changed:
> https:/
>
> Status: Open => Answered
>
> Myles English proposed the following answer:
>
> Derek Thomas writes:
>
>> Derek Thomas is still having a problem:
>> Yes, it's set to /usr. The problem seems to be that the cmake test
>> doesn't include /usr/local/lib, the location of libarmadillo.so.
>
> Okay, and if it turns out that the problem is elsewhere then may be this
> bug is relevant?:
>
> http://
>
>> On Wed, Aug 22, 2012 at 4:26 PM, Myles English
>>> Are you using packages from the AUR? Do you have $TRILINOS_DIR set?
>
> For some reason, every time I read 'Armadillo', my brain says
> 'Trilinos'.
>
> You don't say if you are using the AUR package scripts, but if you need
> anything adding to the package build let me know.
>
> Myles
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https:/
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https:/
>
> You received this question notification because you asked the question.
Revision history for this message
|
#5 |
Look in <dolfin-
Have you set CMake to use clang++? If not, it will probably use g++ and then it doesn't make sense to run the Armadillo test program (test.cpp) with clang++. Try using g++ instead. If test.cpp fails with g++, then you probably have the GCC 4.7 bug that Myles mentioned.
BTW, you can specify the path to libarmadillo.so by running cmake with -DARMADILLO_
Revision history for this message
|
#6 |
I definitely have the gcc 4.7.1/armadillo bug. That's why I switched
to clang/clang++. Unfortunately, even with setting
ARMADILLO_LIBRARIES the build still can't find armadillo.
On Thu, Aug 23, 2012 at 12:21 AM, Johannes Ring
<email address hidden> wrote:
> Your question #206520 on FEniCS Project changed:
> https:/
>
> Status: Open => Answered
>
> Johannes Ring proposed the following answer:
> Look in <dolfin-
> a hint of why the Armadillo test fails.
>
> Have you set CMake to use clang++? If not, it will probably use g++ and
> then it doesn't make sense to run the Armadillo test program (test.cpp)
> with clang++. Try using g++ instead. If test.cpp fails with g++, then
> you probably have the GCC 4.7 bug that Myles mentioned.
>
> BTW, you can specify the path to libarmadillo.so by running cmake with
> -DARMADILLO_
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https:/
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https:/
>
> You received this question notification because you asked the question.
Revision history for this message
|
#7 |
I definitely have the gcc 4.7.1/armadillo bug. That's why I switched
to clang/clang++. Unfortunately, even with setting
ARMADILLO_LIBRARIES the build still can't find armadillo.
On Thu, Aug 23, 2012 at 12:21 AM, Johannes Ring
<email address hidden> wrote:
> Your question #206520 on FEniCS Project changed:
> https:/
>
> Status: Open => Answered
>
> Johannes Ring proposed the following answer:
> Look in <dolfin-
> a hint of why the Armadillo test fails.
>
> Have you set CMake to use clang++? If not, it will probably use g++ and
> then it doesn't make sense to run the Armadillo test program (test.cpp)
> with clang++. Try using g++ instead. If test.cpp fails with g++, then
> you probably have the GCC 4.7 bug that Myles mentioned.
>
> BTW, you can specify the path to libarmadillo.so by running cmake with
> -DARMADILLO_
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https:/
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https:/
>
> You received this question notification because you asked the question.
Revision history for this message
|
#8 |
On 23 August 2012 18:16, Derek Thomas
<email address hidden> wrote:
> Question #206520 on FEniCS Project changed:
> https:/
>
> Status: Answered => Open
>
> Derek Thomas is still having a problem:
> I definitely have the gcc 4.7.1/armadillo bug. That's why I switched
> to clang/clang++. Unfortunately, even with setting
> ARMADILLO_LIBRARIES the build still can't find armadillo.
>
The build system doesn't just look for and find libraries. It tests
them. That's why you need to look in CMakeError.log, as suggested by
Johannes. Armadillo is delicate, and my experience is that it is easy
to find, but often not easy to link. Any linking issues will be
apparent in CMakeError.log.
Garth
> On Thu, Aug 23, 2012 at 12:21 AM, Johannes Ring
> <email address hidden> wrote:
>> Your question #206520 on FEniCS Project changed:
>> https:/
>>
>> Status: Open => Answered
>>
>> Johannes Ring proposed the following answer:
>> Look in <dolfin-
>> a hint of why the Armadillo test fails.
>>
>> Have you set CMake to use clang++? If not, it will probably use g++ and
>> then it doesn't make sense to run the Armadillo test program (test.cpp)
>> with clang++. Try using g++ instead. If test.cpp fails with g++, then
>> you probably have the GCC 4.7 bug that Myles mentioned.
>>
>> BTW, you can specify the path to libarmadillo.so by running cmake with
>> -DARMADILLO_
>>
>> --
>> If this answers your question, please go to the following page to let us
>> know that it is solved:
>> https:/
>>
>> If you still need help, you can reply to this email or go to the
>> following page to enter your feedback:
>> https:/
>>
>> You received this question notification because you asked the question.
>
> --
> You received this question notification because you are a member of
> FEniCS Team, which is an answer contact for FEniCS Project.
Can you help with this problem?
Provide an answer of your own, or ask Derek Thomas for more information if necessary.