OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

Error Building with minGW


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Build system [build]
View previous topic :: View next topic  
Author Message
manzjosh7
Newbie


Joined: 05 Mar 2014
Posts: 3

PostPosted: Wed Mar 05, 2014 3:39 pm    Post subject:
Error Building with minGW
Reply with quote

Hi,

I'm having problems building openScengraph on windows 7 using mingw32-make 3.82.90

It is resulting in the following error:

Linking CXX shared library ..\..\bin\libosgDB.dll
CMakeFiles\osgDB.dir/objects.a(Compressors.obj):Compressors.cpp:(.text$_ZN14ZLib
Compressor8compressERSoRKSs[__ZN14ZLibCompressor8compressERSoRKSs]+0x89): undefi
ned reference to `deflateInit2_'
CMakeFiles\osgDB.dir/objects.a(Compressors.obj):Compressors.cpp:(.text$_ZN14ZLib
Compressor8compressERSoRKSs[__ZN14ZLibCompressor8compressERSoRKSs]+0xf4): undefi
ned reference to `deflate'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: CMakeFiles
\osgDB.dir/objects.a(Compressors.obj): bad reloc address 0xf4 in section `.text$
_ZN14ZLibCompressor8compressERSoRKSs[__ZN14ZLibCompressor8compressERSoRKSs]'
collect2.exe: error: ld returned 1 exit status
src\osgDB\CMakeFiles\osgDB.dir\build.make:979: recipe for target 'bin/libosgDB.d
ll' failed
mingw32-make[2]: *** [bin/libosgDB.dll] Error 1
CMakeFiles\Makefile2:297: recipe for target 'src/osgDB/CMakeFiles/osgDB.dir/all'
failed
mingw32-make[1]: *** [src/osgDB/CMakeFiles/osgDB.dir/all] Error 2
Makefile:115: recipe for target 'all' failed
mingw32-make: *** [all] Error 2



Does anyone have any idea as to what the problem might be and how to fix it?

...


Thank you!

Cheers,
Josh
Back to top
View user's profile Send private message
kornerr
Appreciator


Joined: 01 Oct 2013
Posts: 300

PostPosted: Thu Mar 06, 2014 9:40 am    Post subject:
Error Building with minGW
Reply with quote

Hi.
It means that zlib.dll (iirc, or zlib.a) doesn't have deflateInit2_, deflate functions. If you static linked zlib, you should do the opposite.



2014-03-05 22:39 GMT+07:00 Josh Manz < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>:
Quote:
Hi,

I'm having problems building openScengraph on windows 7 using mingw32-make 3.82.90

It is resulting in the following error:

Linking CXX shared library ....binlibosgDB.dll
CMakeFilesosgDB.dir/objects.a(Compressors.obj):Compressors.cpp:(.text$_ZN14ZLib
Compressor8compressERSoRKSs[__ZN14ZLibCompressor8compressERSoRKSs]+0x89): undefi
ned reference to `deflateInit2_'
CMakeFilesosgDB.dir/objects.a(Compressors.obj):Compressors.cpp:(.text$_ZN14ZLib
Compressor8compressERSoRKSs[__ZN14ZLibCompressor8compressERSoRKSs]+0xf4): undefi
ned reference to `deflate'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: CMakeFiles
osgDB.dir/objects.a(Compressors.obj): bad reloc address 0xf4 in section `.text$
_ZN14ZLibCompressor8compressERSoRKSs[__ZN14ZLibCompressor8compressERSoRKSs]'
collect2.exe: error: ld returned 1 exit status
srcosgDBCMakeFilesosgDB.dirbuild.make:979: recipe for target 'bin/libosgDB.d
ll' failed
mingw32-make[2]: *** [bin/libosgDB.dll] Error 1
CMakeFilesMakefile2:297: recipe for target 'src/osgDB/CMakeFiles/osgDB.dir/all'
 failed
mingw32-make[1]: *** [src/osgDB/CMakeFiles/osgDB.dir/all] Error 2
Makefile:115: recipe for target 'all' failed
mingw32-make: *** [all] Error 2



Does anyone have any idea as to what the problem might be and how to fix it?

...


Thank you!

Cheers,
Josh

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=58463#58463





_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
manzjosh7
Newbie


Joined: 05 Mar 2014
Posts: 3

PostPosted: Thu Mar 06, 2014 8:55 pm    Post subject:
Reply with quote

Hi,

First of all, thank you for replying. I agree that the inflate/deflate functions cannot be located however I don't know why zlib would have them.
I did nm on the zlib and here is the result:

$ nm libz.a | grep deflate
U _deflate
U _deflateEnd
U _deflateInit_
U _deflate
U _deflateEnd
U _deflateInit2_
U _deflateParams
deflate.o:
00001570 T _deflate
00000080 R _deflate_copyright
000007f0 t _deflate_fast
00000c60 t _deflate_slow
00000590 t _deflate_stored
00001530 T _deflateBound
000029d0 T _deflateCopy
000023a0 T _deflateEnd
00002790 T _deflateInit_
000024a0 T _deflateInit2_
000022b0 T _deflateParams
000014b0 T _deflatePrime
000012f0 T _deflateReset
00001190 T _deflateSetDictionary
00001480 T _deflateSetHeader
000014f0 T _deflateTune


Correct me if i'm wrong but it seems like the inflate/deflate functions are there. I'm using zlib 1.2.3 and have previously tried zlib 1.2.5 with no luck. If you have been successful with other versions of zlib please let me know which one it is and I will give that a try.

Thanks,

...


Thank you!

Cheers,
Josh
Back to top
View user's profile Send private message
kornerr
Appreciator


Joined: 01 Oct 2013
Posts: 300

PostPosted: Fri Mar 07, 2014 1:37 pm    Post subject:
Error Building with minGW
Reply with quote

As you see, they don't have underscores. I have a suspicion you didn't compile zlib with MinGW. I compiled all dependencies myself with MinGW.



2014-03-07 3:55 GMT+07:00 Josh Manz < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>:
Quote:
Hi,

First of all, thank you for replying.  I agree that the inflate/deflate functions cannot be located however I don't know why zlib would have them.
I did nm on the zlib and here is the result:

$ nm libz.a | grep deflate
         U _deflate
         U _deflateEnd
         U _deflateInit_
         U _deflate
         U _deflateEnd
         U _deflateInit2_
         U _deflateParams
deflate.o:
00001570 T _deflate
00000080 R _deflate_copyright
000007f0 t _deflate_fast
00000c60 t _deflate_slow
00000590 t _deflate_stored
00001530 T _deflateBound
000029d0 T _deflateCopy
000023a0 T _deflateEnd
00002790 T _deflateInit_
000024a0 T _deflateInit2_
000022b0 T _deflateParams
000014b0 T _deflatePrime
000012f0 T _deflateReset
00001190 T _deflateSetDictionary
00001480 T _deflateSetHeader
000014f0 T _deflateTune


Correct me if i'm wrong but it seems like the inflate/deflate functions are there.   I'm using zlib 1.2.3 and have previously tried zlib 1.2.5 with no luck.  If you have been successful with other versions of zlib please let me know which one it is and I will give that a try.

Thanks,

...


Thank you!

Cheers,
Josh

------------------
Read this topic online here:

http://forum.openscenegraph.org/viewtopic.php?p=58508#58508





_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
manzjosh7
Newbie


Joined: 05 Mar 2014
Posts: 3

PostPosted: Mon Mar 10, 2014 3:30 pm    Post subject:
Reply with quote

Hi,

Thanks for helping me figure this out. It turned out that somehow I was not using the zlib library that I built but a pre-compiled one that I had previously downloaded. Once I made sure that the zlib library I built was used, it compiled fine.

Thanks again

...

Josh
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Build system [build] All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts OpenGL Error 'invalid value' when usi... Blanky General 0 Thu Jun 27, 2019 12:10 am View latest post
No new posts Building with MinGW on Windows 10 Skaldi Build system [build] 4 Sat May 18, 2019 3:47 pm View latest post
No new posts Building with Visual Studio 2019 icf80 Build system [build] 0 Fri May 10, 2019 11:20 am View latest post
No new posts Building with Visual Studio 2019 icf80 Build system [build] 2 Fri May 10, 2019 11:19 am View latest post
No new posts Question about method of building osgQt trexmsuee Build system [build] 1 Thu Apr 11, 2019 2:22 pm View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP