Sorry, i forgot to attach a description of the failures:
I followed the instruction, edited the u3d.conf, checked that the XML::Parser and XML::Simple perl modules work correctly,
exposted a couple of vars, but when i start the build.sh script it fails.
Here is a transcript:
") as an ARRAY ref while "strict refs" in use at /sw/lib/perl5/5.8.8/XML/Simple.pm line 233.
cp: projects.ini: No such file or directory
can not open /Users/mylogin/Desktop/U3D_A_061228_5/Source/Config/projects.ini file at build.pm line 50.
Compilation failed in require at parsing.pl line 25.
BEGIN failed--compilation aborted at parsing.pl line 25.
thanks again
for your help
P.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello. As i see you have set only two environment variables. For build all sources at first must be automatically created projects.ini that contain all information for current platform how to build sources from what it depend with what command(make) line. And I think there may be two reasons why it (projects.ini) can’t be created (automatically by perl scripts):
- At first you environment variables are not set properly. For example my bush profile contain such lines….
export U3D_SOURCE=/***/Source/
export U3D_LIBDIR=${U3D_SOURCE}Build/U3D/
export LD_LIBRARY_PATH=$U3D_LIBDIR:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH=${U3D_SOURCE}Build/U3D:/usr/local/lib:${LD_LIBRARY_PATH}:/usr/lib/gcc/darwin/3.3:/usr/lib/gcc/darwin/3.3/
export DYLD_LIBRARY_PATH=${U3D_SOURCE}Build/U3D
export U3D_DEBUGLEVEL=3
export PERLLIB=/***/perl/System/Library/Perl/5.8.6/darwin-thread-multi-2level
How I remember DYLD_LIBRARY_PATH must be set in Mac OS system instead of LD_LIBRARY_PATH (that must be set on Linux platform). PERLLIB i set for XML:Parser and XML:Simple modules, because i had only user access.
- The second reason that XML:Simple or XML:Parser doesn't work properly nevertheless.
If first method doesn’t give good result you can go in two ways:
- At first you can generate projects.ini at another platform (for example on Linux) and use it at Mac OS system. For this you will need to do, copy projects.ini from Source\Config\ folder on Linux to the same folder on Mac OS, and make some modifications in Source\Tools\BuildSystem\build.sh when run it in Mac OS, comment or delete this lines…
perl xml_parser.pl ../../Config/
cp -f projects.ini ../../Config/
rm -f projects.ini
- At second you will need to debug scripts by putting print strings and escape words in different places for searching the reason.
And also is your Source\Config\u3d.conf is set to Mac OS platform? This 7-en lines must be uncommented and all others must be commented.
U3D_PLATFORM = Mac32
U3D_COMPILER = gcc
U3D_SLIB_LINKER = libtool
U3D_DLIB_LINKER = g++
U3D_EXEC_LINKER = g++
U3D_OUTPUT = Build/U3D
U3D_LINKDEP = dependencies
Thanks, Simeon.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks Simeon,
your message was very informative (forums will be an heaven if anyone would try to answer as you),
but unfortunately I still do not succeed in compiling u3d under a mac...
Here is a short report on what I tried and how it failed.
Attempts tried on a MacBookPro with OS X 10.4. Using fink to get updated perl, and cpan for perl packages, with the following environment vars:
I have tried to debug this issue but without success. :(
It happens that on a mac with latest perl (5.8.8) and latest version of XML::Simple (2.18) the XML::Simple parsing function fails in reading the xml containing the mac configuration "Source/Config/project_Mac32.xml" e.g. when perl call the xml parsing function
it fails inside the XML::Simple code. I do not know the reason of that, I have tried to give the offending xml to some xml validating engines but they did not report any error.
-- Second attempt: make the parsing on another machine.
following your suggestion I used a linux box for performing the processing of the config file.
I copied the xml config file (the one generated in Source/Config/project_Mac32.xml ) in the right place,
set up the envirnoment and started the perl processing on the linux machine. It worked. Then I copied back the resulting projects.ini onto the mac and i modified build.sh in the reasonable proposed way (commented out the three lines involving the generation of that file).
At this point the build process start and it succeed to build a lot of things, compiling most of the packages but then it stops when linking the Core; here is the transcript of the output:
----------------- begin transcript ------------
mac-cignoni:~/devel/Stuff/U3D_A_061228_5/Source/Tools/BuildSystem$ bash build.sh Core
Building Core
Base is up-to-date
Predicates is up-to-date
Glyph2D is up-to-date
BoundHierarchy is up-to-date
BitStream is up-to-date
Bones is up-to-date
Common is up-to-date
Mesh is up-to-date
ModifierChain is up-to-date
CLOD is up-to-date
Palette is up-to-date
Platform is up-to-date
Scenegraph is up-to-date
PointSet is up-to-date
LineSet is up-to-date
Subdiv is up-to-date
UVGenerator is up-to-date
IJG is up-to-date
ZLib is up-to-date
PNG is up-to-date
Texture is up-to-date
WildCards is up-to-date
DataTypes is up-to-date
Memory is up-to-date
Platform is up-to-date
Kernel is up-to-date
Shaders is up-to-date
CLODAuthor is up-to-date
libtool: file: ~/devel/Stuff/U3D_A_061228_5/Source/RTL/Build/Core/debug/dependencies/IFXBoundingBox.o has no symbols
libtool: file: ~/devel/Stuff/U3D_A_061228_5/Source/RTL/Build/Core/debug/dependencies/IFXTQTAttribute.o has no symbols
libtool: file: ~/devel/Stuff/U3D_A_061228_5/Source/RTL/Build/Core/debug/dependencies/pnggccrd.o has no symbols
libtool: file: ~/devel/Stuff/U3D_A_061228_5/Source/RTL/Build/Core/debug/dependencies/pngvcrd.o has no symbols
ld: symbols names listed in -exported_symbols_list: IFXCore.def not in linked objects
----------------- begin transcript ------------
Any hints? Has someone succeeded u3d lib over a mac?
Thanks in advance to everyone will help :)
Cheers
P.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
as to the first issue:
Are you sure that XML::Parser is used by XML::Simple and not XML::SAX?
You may put before that XMLin line
$XML::Simple::PREFERRED_PARSER='XML::Parser';
or
export XML_SIMPLE_PREFERRED_PARSER=XML::Parser
before compile to ensure that.
Helped in my case.
As to the second issue I am of no help, as I am on a PPC Mac,
and IFXHistogramDynamic.cpp inside BitStream component turned out to be
partially coded in Intel assembler, thus compile stoped early.
What Mac are you riding?
Sincerely, Mixhail
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
before line 51 of xml_parser.pl solved completely the XML issue!
Unfortunately that was not enough. After that i got stuck again on the above reported error:
ld: symbols names listed in -exported_symbols_list: IFXCore.def not in linked objects
But this was easier to be managed, all the *.def files in the directories under Source/RTL/Platform/Mac32/XXXXX/XXX.def are not correct for the mac linker.
To solve this issue you have simply to remove the big comment at the beginning of the file and leave only the important lines (e.g. the names of the exported stuff).
And YES after that it succeeded in compiling everything!!!!
Now I have binaries for building the MeshLab with U3D exporting also for Macs! (intel only sorry :( )
For a sample of what you can do with MeshLab and U3D support look at following page:
Last night I have rooted out the bug that
prevented programs from running -
the wise programers from Intel use an
assembly routine to check if Mac
supports MMX, SSE, SSE2, SSE3!
It will not work on a PPC Mac and
is completely useless on an Intel Mac.
As an additional benefit it caused memory access violations
on my new MacBook/Leopard!
Made that test (IFXOSCheckCPUFeature) to always return TRUE
and the test programs do compile and run now.
BTW, the version of "Integrated Performance Primitives"
the u3d lib is trying to look for seems to be obsolete anyway.
May be it makes sense to comment out that lookups.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am trying without success to build the u3d library under Mac Os X,
I would like to add U3D support to MeshLab ( http://meshlab.sourceforge.net ).
Has someone succeeded in compiling the lib under Mac Os X?
Nobody in the forum cite macs.
Thanks in advance
P.
Sorry, i forgot to attach a description of the failures:
I followed the instruction, edited the u3d.conf, checked that the XML::Parser and XML::Simple perl modules work correctly,
exposted a couple of vars, but when i start the build.sh script it fails.
Here is a transcript:
mac-mylogin:~ mylogin$ cd Desktop/U3D_A_061228_5/Source/Tools/BuildSystem/
mac-mylogin:~/Desktop/U3D_A_061228_5/Source/Tools/BuildSystem mylogin$ perl -MXML::Parser -e 1; echo $?;
0
mac-mylogin:~/Desktop/U3D_A_061228_5/Source/Tools/BuildSystem mylogin$ perl -MXML::Simple -e 1; echo $?;
0
mac-mylogin:~/Desktop/U3D_A_061228_5/Source/Tools/BuildSystem mylogin$ export U3D_SOURCE=/Users/mylogin/Desktop/U3D_A_061228_5/Source/
mac-mylogin:~/Desktop/U3D_A_061228_5/Source/Tools/BuildSystem mylogin$ export U3D_LIBDIR=${U3D_SOURCE}Build/U3D
mac-mylogin:~/Desktop/U3D_A_061228_5/Source/Tools/BuildSystem mylogin$ ./build.sh
Can't use string ("
") as an ARRAY ref while "strict refs" in use at /sw/lib/perl5/5.8.8/XML/Simple.pm line 233.
cp: projects.ini: No such file or directory
can not open /Users/mylogin/Desktop/U3D_A_061228_5/Source/Config/projects.ini file at build.pm line 50.
Compilation failed in require at parsing.pl line 25.
BEGIN failed--compilation aborted at parsing.pl line 25.
thanks again
for your help
P.
Hello. As i see you have set only two environment variables. For build all sources at first must be automatically created projects.ini that contain all information for current platform how to build sources from what it depend with what command(make) line. And I think there may be two reasons why it (projects.ini) can’t be created (automatically by perl scripts):
- At first you environment variables are not set properly. For example my bush profile contain such lines….
export U3D_SOURCE=/***/Source/
export U3D_LIBDIR=${U3D_SOURCE}Build/U3D/
export LD_LIBRARY_PATH=$U3D_LIBDIR:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH=${U3D_SOURCE}Build/U3D:/usr/local/lib:${LD_LIBRARY_PATH}:/usr/lib/gcc/darwin/3.3:/usr/lib/gcc/darwin/3.3/
export DYLD_LIBRARY_PATH=${U3D_SOURCE}Build/U3D
export U3D_DEBUGLEVEL=3
export PERLLIB=/***/perl/System/Library/Perl/5.8.6/darwin-thread-multi-2level
How I remember DYLD_LIBRARY_PATH must be set in Mac OS system instead of LD_LIBRARY_PATH (that must be set on Linux platform). PERLLIB i set for XML:Parser and XML:Simple modules, because i had only user access.
- The second reason that XML:Simple or XML:Parser doesn't work properly nevertheless.
If first method doesn’t give good result you can go in two ways:
- At first you can generate projects.ini at another platform (for example on Linux) and use it at Mac OS system. For this you will need to do, copy projects.ini from Source\Config\ folder on Linux to the same folder on Mac OS, and make some modifications in Source\Tools\BuildSystem\build.sh when run it in Mac OS, comment or delete this lines…
perl xml_parser.pl ../../Config/
cp -f projects.ini ../../Config/
rm -f projects.ini
- At second you will need to debug scripts by putting print strings and escape words in different places for searching the reason.
And also is your Source\Config\u3d.conf is set to Mac OS platform? This 7-en lines must be uncommented and all others must be commented.
U3D_PLATFORM = Mac32
U3D_COMPILER = gcc
U3D_SLIB_LINKER = libtool
U3D_DLIB_LINKER = g++
U3D_EXEC_LINKER = g++
U3D_OUTPUT = Build/U3D
U3D_LINKDEP = dependencies
Thanks, Simeon.
Thanks Simeon,
your message was very informative (forums will be an heaven if anyone would try to answer as you),
but unfortunately I still do not succeed in compiling u3d under a mac...
Here is a short report on what I tried and how it failed.
Attempts tried on a MacBookPro with OS X 10.4. Using fink to get updated perl, and cpan for perl packages, with the following environment vars:
export U3D_SOURCE=~/devel/Stuff/U3D_A_061228_5/Source/
export U3D_LIBDIR=${U3D_SOURCE}Build/U3D/
export PERLLIB=/sw/lib/perl5/5.8.8/darwin-thread-multi-2level
export LD_LIBRARY_PATH=$U3D_LIBDIR:${LD_LIBRARY_PATH}
export DYLD_LIBRARY_PATH=${U3D_SOURCE}Build/U3D
export U3D_DEBUGLEVEL=3
-- First issue: XML::Simple failure --
I have tried to debug this issue but without success. :(
It happens that on a mac with latest perl (5.8.8) and latest version of XML::Simple (2.18) the XML::Simple parsing function fails in reading the xml containing the mac configuration "Source/Config/project_Mac32.xml" e.g. when perl call the xml parsing function
my $tree = XMLin( $xml_file_name, suppressempty => "", forcearray => [ "project_description" ] );
it fails inside the XML::Simple code. I do not know the reason of that, I have tried to give the offending xml to some xml validating engines but they did not report any error.
-- Second attempt: make the parsing on another machine.
following your suggestion I used a linux box for performing the processing of the config file.
I copied the xml config file (the one generated in Source/Config/project_Mac32.xml ) in the right place,
set up the envirnoment and started the perl processing on the linux machine. It worked. Then I copied back the resulting projects.ini onto the mac and i modified build.sh in the reasonable proposed way (commented out the three lines involving the generation of that file).
At this point the build process start and it succeed to build a lot of things, compiling most of the packages but then it stops when linking the Core; here is the transcript of the output:
----------------- begin transcript ------------
mac-cignoni:~/devel/Stuff/U3D_A_061228_5/Source/Tools/BuildSystem$ bash build.sh Core
Building Core
Base is up-to-date
Predicates is up-to-date
Glyph2D is up-to-date
BoundHierarchy is up-to-date
BitStream is up-to-date
Bones is up-to-date
Common is up-to-date
Mesh is up-to-date
ModifierChain is up-to-date
CLOD is up-to-date
Palette is up-to-date
Platform is up-to-date
Scenegraph is up-to-date
PointSet is up-to-date
LineSet is up-to-date
Subdiv is up-to-date
UVGenerator is up-to-date
IJG is up-to-date
ZLib is up-to-date
PNG is up-to-date
Texture is up-to-date
WildCards is up-to-date
DataTypes is up-to-date
Memory is up-to-date
Platform is up-to-date
Kernel is up-to-date
Shaders is up-to-date
CLODAuthor is up-to-date
----- Build started: Project: Core, Configuration: debug Mac32 -----
libtool: file: ~/devel/Stuff/U3D_A_061228_5/Source/RTL/Build/Core/debug/dependencies/IFXBoundingBox.o has no symbols
libtool: file: ~/devel/Stuff/U3D_A_061228_5/Source/RTL/Build/Core/debug/dependencies/IFXTQTAttribute.o has no symbols
libtool: file: ~/devel/Stuff/U3D_A_061228_5/Source/RTL/Build/Core/debug/dependencies/pnggccrd.o has no symbols
libtool: file: ~/devel/Stuff/U3D_A_061228_5/Source/RTL/Build/Core/debug/dependencies/pngvcrd.o has no symbols
ld: symbols names listed in -exported_symbols_list: IFXCore.def not in linked objects
----------------- begin transcript ------------
Any hints? Has someone succeeded u3d lib over a mac?
Thanks in advance to everyone will help :)
Cheers
P.
Dear Paolo,
as to the first issue:
Are you sure that XML::Parser is used by XML::Simple and not XML::SAX?
You may put before that XMLin line
$XML::Simple::PREFERRED_PARSER='XML::Parser';
or
export XML_SIMPLE_PREFERRED_PARSER=XML::Parser
before compile to ensure that.
Helped in my case.
As to the second issue I am of no help, as I am on a PPC Mac,
and IFXHistogramDynamic.cpp inside BitStream component turned out to be
partially coded in Intel assembler, thus compile stoped early.
What Mac are you riding?
Sincerely, Mixhail
THANKS Mixhail!
Your suggestion was correct! adding a
$XML::Simple::PREFERRED_PARSER='XML::Parser';
before line 51 of xml_parser.pl solved completely the XML issue!
Unfortunately that was not enough. After that i got stuck again on the above reported error:
ld: symbols names listed in -exported_symbols_list: IFXCore.def not in linked objects
But this was easier to be managed, all the *.def files in the directories under Source/RTL/Platform/Mac32/XXXXX/XXX.def are not correct for the mac linker.
To solve this issue you have simply to remove the big comment at the beginning of the file and leave only the important lines (e.g. the names of the exported stuff).
And YES after that it succeeded in compiling everything!!!!
Now I have binaries for building the MeshLab with U3D exporting also for Macs! (intel only sorry :( )
For a sample of what you can do with MeshLab and U3D support look at following page:
http://meshlab.sourceforge.net/wiki/index.php/U3D_support
Thanks again to every one in the forum for your valuable help!
P.
Dear Paolo,
what was your environment:
OS X species, compiler version,
environment variables and command line.
In my case (Intel Leopard) I get unworking executables.
M.
I am using Os X 10.4.
g++ --version
i686-apple-darwin8-g++-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5367)
What kind of issues do you get?
I will switch to Leopard in the next month, so i will try to recompile it and report there any issues i will encounter...
P.
It seems to want (or need) some Intel "Integrated Performance Primitives" library.
Do you have such a beast or it is unnecessary?
M.
Paolo,
may be you can put compiled libraries and binaries somewhere people can grab them from?
Last night I have rooted out the bug that
prevented programs from running -
the wise programers from Intel use an
assembly routine to check if Mac
supports MMX, SSE, SSE2, SSE3!
It will not work on a PPC Mac and
is completely useless on an Intel Mac.
As an additional benefit it caused memory access violations
on my new MacBook/Leopard!
Made that test (IFXOSCheckCPUFeature) to always return TRUE
and the test programs do compile and run now.
BTW, the version of "Integrated Performance Primitives"
the u3d lib is trying to look for seems to be obsolete anyway.
May be it makes sense to comment out that lookups.