Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Dolphin emulator:linker issue[SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
nerorevenge
n00b
n00b


Joined: 03 Mar 2013
Posts: 8

PostPosted: Sun Mar 03, 2013 3:34 pm    Post subject: Dolphin emulator:linker issue[SOLVED] Reply with quote

Hello

I am not exactly a linux newbie , but right after facing linker issues that I couldn't comprehend
(while building dolphin) it dawned on me as to how much I don't
understand about low level stuff.

The following happens to be an excerpt from the output to
the command terminal after the "make && make install " command was entered.

[ 92%] Built target core
[ 94%] Built target discio
Linking CXX executable ../../../Binaries/dolphin-emu
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lCg
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lCgGL
collect2: ld returned 1 exit status
make[2]: *** [Binaries/dolphin-emu] Error 1
make[1]: *** [Source/Core/DolphinWX/CMakeFiles/dolphin-emu.dir/all] Error 2
make: *** [all] Error 2

I am not exactly looking or a direct answer, after searching on google for stuff related to
the LD_LIBRARY_PATH variable to trying to understand shared,static and dynamic libraries,
I'd appreciate a lead.

Nero


Last edited by nerorevenge on Sun Mar 10, 2013 10:38 am; edited 2 times in total
Back to top
View user's profile Send private message
mahdi1234
Guru
Guru


Joined: 19 Feb 2005
Posts: 489
Location: far from new world orderia

PostPosted: Sun Mar 03, 2013 4:56 pm    Post subject: Reply with quote

What do you mean by "make && make install " are you installing manually (not using emerge) or which ebuild is it?
_________________
http://gentoo.mahdi.cz <-- gentoo package search engine
Back to top
View user's profile Send private message
nerorevenge
n00b
n00b


Joined: 03 Mar 2013
Posts: 8

PostPosted: Sun Mar 03, 2013 8:06 pm    Post subject: Reply with quote

Hello

I am manually building it.Or atleast that is what I think I am doing.

this is the page :http://code.google.com/p/dolphin-emu/wiki/Linux_Build

from the issue page it seems that the linker for some reason does not seem to find the nvidia toolkit.

Hope that sheds some light on the matter.
Back to top
View user's profile Send private message
mahdi1234
Guru
Guru


Joined: 19 Feb 2005
Posts: 489
Location: far from new world orderia

PostPosted: Sun Mar 03, 2013 8:09 pm    Post subject: Reply with quote

nerorevenge, that's not really needed in this case.

You can find ebuild for the package in several overlays - http://gentoo.mahdi.cz/games-emulation:dolphin-emu.html

To add/remove packages from overlay there's layman tool, see - http://www.gentoo.org/proj/en/overlays/userguide.xml

Hope this helps.

cheers
_________________
http://gentoo.mahdi.cz <-- gentoo package search engine
Back to top
View user's profile Send private message
nerorevenge
n00b
n00b


Joined: 03 Mar 2013
Posts: 8

PostPosted: Sun Mar 03, 2013 8:42 pm    Post subject: Reply with quote

Greetings

Would it be fair to say that even if the ebuild does solve my problems

there would be no way of knowing as to why there was a problem while

trying to manually build it? Or perhaps just reading the ebuild should provide

a clue as to where and what went wrong.

Regardless, appreciate the help.Will report more when I have gotten down

to actually running the ebuild (which for reasons related to Sabayon) will only happen

hopefully after an one hour.
Back to top
View user's profile Send private message
_______0
Guru
Guru


Joined: 15 Oct 2012
Posts: 521

PostPosted: Mon Mar 04, 2013 12:41 pm    Post subject: Reply with quote

I had a similar issue, though for avoiding the ebuild route I resorted to build myself as well.

Make sure you run cmake CMakeList.txt first. Then make no need to make install as you can run the binary from the Binary folders. As of the nvidia toolkit issue it's because gentoo opted out to install it outside the traditional place /usr/lib into /opt.

The nvidia package is this one:

nvidia-cg-toolkit

Here how I solved the problem was to create symlinks to each nv toolkit binary in /opt/nvidia-gc-toolkit. The weird think is why it let you reach 94% of the build. Here without the symlinks it'd would stop at 40% or 50%.

The files that need to be in:

/usr/bin
/usr/include
/usr/lib

gentoo have them in:

/opt/nvidia-cg-toolkit/bin
/opt/nvidia-cg-toolkit/lib
/opt/nvidia-cg-toolkit/include

by the way, trying random ebuilds is not a good idea since they have wildly differing patches and crazy stuff.

By looking at cmake output gives you hints whats what.



One extra package that dolphin can use from system is:

media-libs/libsfml
"Found SFML: /usr/include"

I haven't been able to track down the SOIL package in gentoo but it does exist in debian:

"Using static SOIL from Externals"

UPDATE:

Damn, as I was replying in upgraded to testing nvidia toolkit and broke dolphin EXACTLY the way it's broken with your build. Stable nvidia uses lib testing uses lib64. I fixed by doing this:

ln -s /opt/nvidia-cg-toolkit/lib64/libCg.so /usr/lib64/libCg.so
ln -s /opt/nvidia-cg-toolkit/lib64/libCgGL.so /usr/lib64/libCgGL.so

Version used:

media-gfx/nvidia-cg-toolkit-3.1.0013-r2

hope this helps.

Though I have a different set of issues.

When I start a game I get this error:

SetupWiiMem: Cant find setting file

Then dolphin get's stuck at 100% and games don't start.
Back to top
View user's profile Send private message
nerorevenge
n00b
n00b


Joined: 03 Mar 2013
Posts: 8

PostPosted: Mon Mar 04, 2013 5:18 pm    Post subject: Reply with quote

Greetings

@ __________0

creating the symlinks did help.Thank you for the explanation.Your answer was precisely what I was looking for.

Though it seems I now face a new set issues which is perhaps for some other post , blank screens and games not working.

Other than not encountering the "SetupWiiMem: Cant find setting file " , my problem(new one) sounds the same as yours.

I looked up dolphin issues and it seems (atleast to me and what I understood from reading the posts on there)

a list of roms seem to run without prior configuration, but then from your post, it seems that you are one who digs alot

on the web, I assume that isn't your problem or mine either or it probably is.


How do people normally solve such cases on their own?
Back to top
View user's profile Send private message
_______0
Guru
Guru


Joined: 15 Oct 2012
Posts: 521

PostPosted: Mon Mar 04, 2013 10:29 pm    Post subject: Reply with quote

what do they say about this error??

SetupWiiMem: Cant find setting file

Have any links?
Back to top
View user's profile Send private message
nerorevenge
n00b
n00b


Joined: 03 Mar 2013
Posts: 8

PostPosted: Tue Mar 05, 2013 5:14 pm    Post subject: Reply with quote

Greetings

The links I found are as follows, but I suspect these are ones you might have come across



some people debating realted issues but I must admit I was far too lazy to give all my attention to the entire thing


and lastly if you are any good at C++ and writing and reading/debugging/experimenting impressive code in the same
Back to top
View user's profile Send private message
_______0
Guru
Guru


Joined: 15 Oct 2012
Posts: 521

PostPosted: Tue Mar 05, 2013 6:50 pm    Post subject: Reply with quote

I don't know how to code I just wanna get over this to see some games. The games I am testing do work since in another machine do work.

Now with some interpreter and gfx backend I get these errors:
Code:

BackPatch : Base reg not RBX.

Attempted to access 00000000.

I press ok then:
Code:

Exception handler - access below memory space. 0000000000000000

Press ok again:
Code:

BackPatch - failed to disassemble MOV instruction

Error encountered accessing emulated address 00000000.
Culprit instruction:
add byte ptr ds:[rax], al
at 0x4207f074


These messages keep looping in this same order.

Any ideas how to fix this?
Back to top
View user's profile Send private message
nerorevenge
n00b
n00b


Joined: 03 Mar 2013
Posts: 8

PostPosted: Wed Mar 06, 2013 1:08 pm    Post subject: Reply with quote

Greetings.

I understand .

this is an excerpt from the code on the third url(dolphin-c++ code)

I don't have a solution, but I think understanding the cause of the problem
will reveal a solution and not a pseudo-one.

Take a look at the underline parts in the code.[you don't need to know
how to code in c++ to understand what follows]

Code:
bool CBoot::SetupWiiMemory(unsigned int _CountryCode)
{
        INFO_LOG(BOOT, "Setup Wii Memory...");

        // Write the 256 byte setting.txt to memory. This may not be needed as
        // most or all games read the setting.txt file from
        // \title\00000001\00000002\data\setting.txt directly after the read the
        // SYSCONF file. The games also read it to 0x3800, what is a little strange
        // however is that it only reads the first 100 bytes of it.
        std::string region_filename,
                                settings_Filename(Common::GetTitleDataPath(TITLEID_SYSMENU) + WII_SETTING);

        switch((DiscIO::IVolume::ECountry)_CountryCode)
        {
        case DiscIO::IVolume::COUNTRY_KOREA:
        case DiscIO::IVolume::COUNTRY_TAIWAN:
                // TODO: Determine if Korea / Taiwan have their own specific settings.
        case DiscIO::IVolume::COUNTRY_JAPAN:
                region_filename = File::GetSysDirectory() + WII_SYS_DIR + DIR_SEP + WII_JAP_SETTING;
                break;

        case DiscIO::IVolume::COUNTRY_USA:
                region_filename = File::GetSysDirectory() + WII_SYS_DIR + DIR_SEP + WII_USA_SETTING;
                break;

        case DiscIO::IVolume::COUNTRY_EUROPE:
                region_filename = File::GetSysDirectory() + WII_SYS_DIR + DIR_SEP + WII_EUR_SETTING;
                break;

        default:
                // PanicAlertT("SetupWiiMem: Unknown country. Wii boot process will be switched to European settings.");
                region_filename = File::GetSysDirectory() + WII_SYS_DIR + DIR_SEP + WII_EUR_SETTING;
                break;
        }

        {
        if (File::Exists(settings_Filename))
        {
                File::Delete(settings_Filename);
        }
        File::CreateFullPath(settings_Filename);
        File::Copy(region_filename, settings_Filename);
        File::IOFile settingsFile(settings_Filename, "rb");
        if (!settingsFile)
        {
                PanicAlertT("SetupWiiMem: Cant find setting file"); 
                return false;
        }

        settingsFile.ReadBytes(Memory::GetPointer(0x3800), 256);
        }



it seems this is one of the boot sequence code associated with the country code (I am not sure whether one calls it that)

PanicAlertT("SetupWiiMem: Cant find setting file");


since the code isn't coded to exit here after this part is come across

and look what follows


DVDInterface::DVDRead(0x00000000, 0x00000000, 0x20); // Game Code
Memory::Write_U32(0x0D15EA5E, 0x00000020); // Another magic word
Memory::Write_U32(0x00000001, 0x00000024); // Unknown
Memory::Write_U32(Memory::REALRAM_SIZE, 0x00000028); // MEM1 size 24MB



I am guessing your interpreter complaining about the 000000 address follows from the above code

Once again this is all guess work.

This is all I have for now.But I'm hopefull I'll be able to dig out more.Hopefully.
Back to top
View user's profile Send private message
_______0
Guru
Guru


Joined: 15 Oct 2012
Posts: 521

PostPosted: Thu Mar 07, 2013 9:09 pm    Post subject: Reply with quote

the problem with all this, I found out, is the missing part of:

make install

Because there are tons of files and folders in Data and what not that need to be put in ~/.dolphin-emu and /usr/local/share/dolphin-emu/. That's how some of the ebuilds lying around have it fixed.

I think the best one would be this one:

http://data.gpo.zugaina.org/damex-overlay/games-emulation/dolphin-emu/

in:

http://gpo.zugaina.org/games-emulation/dolphin-emu

Are you still trying to get it installed?

There's also another branch that uses GLSL rather than nvidia CG toolkit. It seems that works better with open source drivers. The branch is GLSL-master but I don't know how to pull that with git command :/ I'd love to try GLSL-master :D

Do you know how to clone/download/check out a branch?
Back to top
View user's profile Send private message
nerorevenge
n00b
n00b


Joined: 03 Mar 2013
Posts: 8

PostPosted: Sun Mar 10, 2013 10:37 am    Post subject: Reply with quote

greetings

I got it installed right after you put in the sym link comment but had trouble getting HP2 to work on it,

and then I installed the glsl branch via git hub(I noticed you got your question answered about the github thing in another post)

and had Pokemon-gale of darkness working on it, but HP2 still doesn't work on it ,which wasn't that unexpected.


I guess this post and the chain of replies that follow it can now be deemed solved and hence closed.
Back to top
View user's profile Send private message
_______0
Guru
Guru


Joined: 15 Oct 2012
Posts: 521

PostPosted: Mon Mar 11, 2013 12:01 pm    Post subject: Reply with quote

wow, it did work, so this is for nvidia and their cg toolkit:

http://c0debreaker.com/wp-content/uploads/2012/06/Linus-Torvalds.jpg

However I did sin with doing make install without an ebuild :/

Pretty cool open source graphics can run wii games. Current state of opengl in linux probably exceeds wii requirements. But it still slow at a times, I don't understand why I am only getting around 30 FPS. I wish I knew how to code :/
Back to top
View user's profile Send private message
nerorevenge
n00b
n00b


Joined: 03 Mar 2013
Posts: 8

PostPosted: Wed Mar 13, 2013 9:28 pm    Post subject: Reply with quote

Greetings.

[Linus Torvalds reply to Nvidia] picture.Nice.

If you have already optimized it by configuring dolphin-emu(eg the enable dual-core for speed mode or something like that) and on your gentoo box by arcane means (use of weird flags) and still are getting around 30 fps, I doubt knowing how to code is enough to obtain what you desire which is : getting a higher fps.

One should also be some sort of optimization wizard at the compiler level.

ONCE AGAIN these are based on very very weak assumptions .

if you have a post on raising your fps and have people giving weird and all next-level mambo-jumbo, please do put in a link here.

As for my on goings, pokemon gale of darkness is a teeny bit slow because I am too scared to fiddle with my kernel modules and figure out
how to get my discrete gpu to work instead of the inbuilt one .

Also it really is never too late to pick up coding and really if you have ever been a big fan of lego or stuff like minecraft , you'll realize
knowing to program makes the computer or rather makes available the greatest and ultimate toy : a computer.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software 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