Comments (21)
Thanks for reporting this. I believe those two files are no longer used in YARP's build process. Removing them has no effect (on Linux), and I see no reference to them in CMake project files. Hard to believe that Xcode would scan them itself. Can you post some more details of the error?
from yarp.
I was debugging this with @iron76 and the error is just "cannot find -lACE"
It is really weird, because cmake FindAce uses the whole path for the library, .pc.in files are never used, and by removing the -lACE from those file it builds with no error.
@iron76 can you try deleting those files and building again?
However, I think that having files for pkg-config is a good idea though... several cmake projects install one in parallel to the CMake exports stuff, so that packages using pkg-config will be able to use YARP anyway.
from yarp.
Not sure that we did everything correctly since now I got the usual linking error (ld: library not found for -lACE) when compiling the yarprun target. This linking error displays regardless of the presence of the two files.
Francesco
from yarp.
strange. I see that src/yarprun/CMakeLists.txt
has a stray line in it:
include_directories(${ACE_INCLUDE_DIRS})
That shouldn't be needed - but also shouldn't have "-lACE" in it. Still, can't think of much else. Will check.
from yarp.
Could you maybe post CMakeCache.txt and any build logs you can cobble together in a pastebin/similar? I'm not seeing where the -lACE would have come from.
from yarp.
The issue seems to be related to the way linker flags are set. In particular, my CMakeCache.txt contains the following line:
ACE_LDFLAGS:INTERNAL=-L/usr/local/Cellar/ace/6.1.8/lib;-lACE
However the generated Xcode project does not contain both these flags but only the second (-lACE). Manually inserting both fixes the problem. Similarly, the problem is fixed by adding a proper search path to the "Library Search Paths" configuration. This information is contained in the following CMakeCache.txt line:
ACE_LIBDIR:INTERNAL=/usr/local/Cellar/ace/6.1.8/lib
I hope this can help.
Francesco
from yarp.
Update. In my case, the Ace linking problem under XCode (ccmake ./ -G Xcode) can be fixed by removing the PKG config lines in the $YARP_ROOT/src/FindACE.cmake file.
if (PKG_CONFIG_FOUND)
pkg_check_modules(ACE ACE)
if (ACE_FOUND)
set(ACE_INCLUDE_DIR_GUESS ${ACE_INCLUDE_DIRS})
set(ACE_LIBRARY_DIR_GUESS ${ACE_LIBRARY_DIRS})
set(ACE_LINK_FLAGS ${ACE_LDFLAGS})
set(ACE_C_FLAGS ${ACE_CFLAGS})
endif (ACE_FOUND)
endif (PKG_CONFIG_FOUND)
I remember we fixed a similar issue in a better way some times ago with Lorenzo Natale at vvv12 (probably a regression bug). If I remember correctly the ACE_* variables are configured in a wrong way by the commented lines above. Still these configuration variables are used by certain targets (and this causes the linking error). After this wrong configuration, the variables are correctly configured by the other lines of the FindACE.cmake file. Certain variables are overwritten correctly and this causes certain other modules to compile correctly.
I hope this helps.
Francesco
from yarp.
can you run on a command line:
pkg-config --libs ACE pkg-config --libs-only-l ACE pkg-config --libs-only-L ACE pkg-config --libs-only-other ACE
from yarp.
pkg-config --libs ACE --> -L/usr/local/Cellar/ace/6.1.8/lib -lACE
pkg-config --libs-only-l ACE --> -lACE
pkg-config --libs-only-L ACE --> -L/usr/local/Cellar/ace/6.1.8/lib
pkg-config --libs-only-other ACE -->
from yarp.
ok, this seems correct.
Can you try running this in YARP source directory?
cmake --find-package -DNAME=ACE -DCOMPILER_ID=GNU -DLANGUAGE=CXX -DMODE=LINK -DCMAKE_MODULE_PATH=$XXX/conf
where $XXX is the path to the file FindACE.cmake
Also try running the same command changing COMPILER_ID to something else, and adding -G Xcode to the command line
from yarp.
cmake --find-package -DNAME=ACE -DCOMPILER_ID=GNU -DLANGUAGE=CXX -DMODE=LINK -DCMAKE_MODULE_PATH=/Users/iron/Code/yarp/conf
gives:
/usr/local/lib/libACE.dylib
cmake -G Xcode --find-package -DNAME=ACE -DCOMPILER_ID=Xcode -DLANGUAGE=CXX -DMODE=LINK -DCMAKE_MODULE_PATH=/Users/iron/Code/yarp/conf
gives:
/usr/local/lib/libACE.dylib
from yarp.
One solution might be to feed the results of pkg-config (particularly ACE_LIBRARY_DIRS) into a call to FIND_LIBRARY, so that we end up with an absolute path to the ACE library in all cases. Another solution is to pepper LINK_DIRECTORIES(${ACE_LIBRARY_DIRS}) here and there, which is rarely fun.
from yarp.
Well, not sure that I am the right person to choose the right solution. I let you guys decide but in the mean while I have a workaround to compile with Xcode.
Francesco
Francesco Nori Robotics Brain Cognitive Science Department
Cognitive Humanoids Lab Istituto Italiano di Tecnologia
Via Morego, 30 16163 Genova, Italy
http://people.liralab.it/iron/ [email protected]:[email protected]
Phone: (+39) 010 71 781 420 Fax: +39 010 71 70 817
On May 8, 2013, at 3:28 AM, paulfitz wrote:
One solution might be to feed the results of pkg-config (particularly ACE_LIBRARY_DIRS) into a call to FIND_LIBRARY, so that we end up with an absolute path to the ACE library in all cases. Another solution is to pepper LINK_DIRECTORIES(${ACE_LIBRARY_DIRS}) here and there, which is rarely fun.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/14#issuecomment-17581449.
from yarp.
I'm strongly against the LINK_DIRECTORIES command, that i think is going to be deprecated in the future...
The problem is probably in the FindACE.cmake file.
@iron76 can you try replacing the content of that files with just these 2 lines
include(MacroStandardFindModule)
macro_standard_find_module(ACE ACE)
and to copying the MacroStandardFindModule.cmake file from the yarp-2.4 branch in the conf directory?
(you can just copy and paste the file from here)
https://github.com/robotology/yarp/blob/yarp-2.4/conf/MacroStandardFindModule.cmake
If it works, it means that we just have to fix the FindACE.cmake file to behave properly
from yarp.
Are we stuck here? @iron76 has a workaround he's happy with and @drdanz, @paulfitz don't have macs...
from yarp.
Sorry, I was busy at ICRA and right in Luxemburg :) Apparently I am missing a macro:
CMake Error at conf/MacroStandardFindModule.cmake:93 (macro_extract_version):
Unknown CMake command "macro_extract_version".
Francesco
Francesco Nori Robotics Brain Cognitive Science Department
Cognitive Humanoids Lab Istituto Italiano di Tecnologia
Via Morego, 30 16163 Genova, Italy
http://people.liralab.it/iron/ [email protected]:[email protected]
Phone: (+39) 010 71 781 420 Fax: +39 010 71 70 817
On May 8, 2013, at 3:10 PM, Daniele E. Domenichelli wrote:
I'm strongly against the LINK_DIRECTORIES command, that i think is going to be deprecated in the future...
The problem is probably in the FindACE.cmake file.
@iron76https://github.com/iron76 can you try replacing the content of that files with just these 2 lines
include(MacroStandardFindModule)
macro_standard_find_module(ACE ACE)
and to copying the MacroStandardFindModule.cmake file from the yarp-2.4 branch in the conf directory?
(you can just copy and paste the file from here)
https://github.com/robotology/yarp/blob/yarp-2.4/conf/MacroStandardFindModule.cmake
If it works, it means that we just have to fix the FindACE.cmake file to behave properly
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/14#issuecomment-17604334.
from yarp.
right, I'm sorry... you will need this file as well
https://github.com/robotology/yarp/blob/yarp-2.4/conf/MacroExtractVersion.cmake
from yarp.
Works greatly.
Thanks Daniele and Paul.
Francesco
from yarp.
So this means that FindACE.cmake is broken on MAC with XCODE generator. So now we just have to debug it and find the problem, or remove all the "UNIX" part and replace it with the macro, and keep just the MSVC part...
from yarp.
@drdanz +1 for replacing the UNIX part with your standardized approach. Along with the MSVC stanza, I think the MINGW stanza would also need to stay.
from yarp.
Now that we merged 2.4 we should port FindACE.cmake to use MacroStandardFindModule
from yarp.
Related Issues (20)
- sender rate HOT 1
- yarpmotorgui - add Select/Deselect all parts Button HOT 1
- Status of YARP CI (updated 14/01/2023) HOT 2
- Problems with C# bindings
- Rethink consistency checker in control board NWS/YARP HOT 2
- yarpmotorgui using 80% of the CPU HOT 7
- Decrease the minimum depth of the depthimage_to_{mono, rgb} portmonitors HOT 4
- Bug in Thrift compiler
- Yarprun doesn't run command when stdio is specified HOT 3
- yarpmotorgui does not save sequences HOT 2
- multipleanalogsensorsserver does not fail if no sensor is exposed
- `serialPort_nws_yarp` doesn't seem to work ok for face expressions HOT 1
- Update install_from_linux.md documentation
- Failure to compile Octave bindings with Ubuntu 22.04
- Unable to compile yarp (Catch2 Lib) on Nvidia Xavier HOT 1
- Compilation error of `Log.cpp` on Windows HOT 5
- Reminder to update github hosted runners in yarp CI HOT 1
- cannot launch the wholebodydynamics and gravitycompensater when doing the redball demo HOT 3
- Cannot stream transforms via the ``frameTransformClient`` from Windows to Ubuntu because ``yarp::os::Time::now()`` is platform dependent HOT 15
- Don't build YARP_catch2 unless explicitly requesting tests HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yarp.