Jump to content

Recommended Posts

Posted

Latest version of nasm is 2.12.02, it works, I tested with 2.12.01.

It works also with 2.10 and 2.07 and many previous versions.

Maybe there is something else here. From the changelog of nasm there were quite a few bugs for osx, so you should use the most recent version if possible.

What is your version again ?

 

As I said, edit the makefile to get the exact invocation of nasm, then copy and paste this line to understand why you get the error, maybe there is a space in a filename (which is normally impossible since the sub directories names have no space and only relative paths are given), anyway you have to test this. Never saw such an error, the most likely place of error when building is the link phase because it might fail to find libraries but usually nasm works without any trouble.

Posted (edited)

TienHuusMacBook:raine-master H2T$ nasm -v

NASM version 0.98.40 (Apple Computer, Inc. build 11) compiled on Aug 24 2016

I am trying to install newest nasm to 2.12.02 successfully

TienHuusMacBook:nasm-2.12.02 H2T$ nasm -v

NASM version 2.12.02 compiled on Oct 3 2016

After that, I try to rebuild Raine again. But I face the next error

 

clang: error: no such file or directory: '/usr/local/lib/libmuparser.a'

make: *** [raine] Error 1

How to solve it? Thanks!
Edited by tien_huu_1408
Posted (edited)

It's not the same error ! It's what I said, the link doesn't detect the location of your libs so you have to edit the makefile tor that.

 

It's from line 868 in the makefile :

ifdef DARWIN
LIBS += /usr/local/lib/libmuparser.a
LIBS_DEBUG += /usr/local/lib/libmuparser.a

so the lib here was forced as a static lib because I had some troube to build the dynamic lib from source, but since you use some package manager to install libmuparser you probably have a dynamic lib. So you can replace the line

LIBS += /usr/local/lib/libmuparser.a

by

LIBS += -lmuparser

You are almost at the end of the build, it's the link after that you'll get a raine executable in the current directory.

Then you'll have to test it to see if it still crashes !

By the way if you need to rebuild it entierly you can use

make -j4

if you have 4 cores in your cpu, speeds things a lot, even though raine is much quicker to build than mame !

Edited by Tux
  • Like 1
Posted (edited)

@Tux: I continued to face another error after following your instruction. Hope you could help me solve it! I think it is the last step. Thanks!

ld: warning: could not create compact unwind for __Z12do_soft_dipsi: stack subl instruction is too different from dwarf stack size
1258 translated messages, 2 fuzzy translations, 270 untranslated messages.
ld: warning: could not create compact unwind for _parse: stack subl instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _get_script_name: stack subl instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _init_scripts: stack subl instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _do_list: stack subl instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for __ZL8open_asmj: stack subl instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _disp_instruction: stack subl instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for __ZL12generate_asmPcjjPhS_: stack subl instruction is too different from dwarf stack size
ld: warning: ignoring file /usr/local/lib/libmuparser.dylib, file was built for x86_64 which is not the architecture being linked (i386): /usr/local/lib/libmuparser.dylib
Undefined symbols for architecture i386:
  "mu::ParserBase::DefineOprt(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, double (*)(double, double), unsigned int, mu::EOprtAssociativity, bool)", referenced from:
      _parse in parser.o
  "mu::ParserBase::AddCallback(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, mu::ParserCallback const&, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, mu::ParserCallback, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, mu::ParserCallback> > >&, char const*)", referenced from:
      _parse in parser.o
  "mu::ParserBase::SetVarFactory(double* (*)(char const*, void*), void*)", referenced from:
      _parse in parser.o
  "mu::ParserBase::DefineInfixOprt(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, double (*)(double), int, bool)", referenced from:
      _parse in parser.o
  "mu::ParserBase::SetExpr(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
      _parse in parser.o
  "mu::ParserBase::DefineVar(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, double*)", referenced from:
      _parse in parser.o
  "mu::ParserBase::~ParserBase()", referenced from:
      mu::Parser::~Parser() in parser.o
      TConsole::TConsole(char*, char*, int, int, commands_t*) in tconsole.o
  "mu::ParserError::ParserError(char const*, int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
      AddVariable(char const*, void*) in parser.o
  "mu::ParserError::~ParserError()", referenced from:
      AddVariable(char const*, void*) in parser.o
  "mu::ParserCallback::ParserCallback(double (*)(char const*), bool)", referenced from:
      _parse in parser.o
  "mu::ParserCallback::ParserCallback(double (*)(double), bool, int, mu::ECmdCode)", referenced from:
      _parse in parser.o
  "mu::Parser::Parser()", referenced from:
      __GLOBAL__sub_I_parser.cpp in parser.o
      TConsole::TConsole(char*, char*, int, int, commands_t*) in tconsole.o
  "mu::ParserBase::GetVersion(mu::EParserVersionInfo) const", referenced from:
      TConsole::TConsole(char*, char*, int, int, commands_t*) in tconsole.o
  "mu::ParserBase::ValidNameChars() const", referenced from:
      _parse in parser.o
  "mu::ParserBase::Eval() const", referenced from:
      _parse in parser.o
  "mu::ParserError::GetMsg() const", referenced from:
      _parse in parser.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [raine] Error 1
 
Edited by tien_huu_1408
  • Like 1
Posted (edited)

Bad news your muparser install seems broken, it says it can't link most of what there is inside the lib !

So.... it's starting to be hard to just post something about that but I'll try again.

1) check this package manager you used to install muparser to see if there is a command line switch to build the static version of muparser (.a). If there is, use it

2) and then revert the change in the makefile of the other day to use the libmuparser.a you just generated, check to see where it's installed, maybe it's not in /usr/local/lib but it should.

If you can't build the static version with this package manager for some reason then uninstall the muparser you installed with it, download muparser directly from its site (use google), cd to its source directory and type :

./configure --disable-shared --disable-samples

make -j4 (if you have 4 cores)

sudo make install

(it will probably ask for your admin password)

then you'll have a libmuparser.a in /usr/local/lib usable by raine, just put back the line in the makefile to use it.

 

EDIT : before doing that, since you upgraded your muparser in the middle of the build, it's very possible that the files using it were not recompiled. So start by just doing

make clean

and make -j4

in raine directory, it might help.

Edited by Tux
Posted (edited)

It means what it says, some symbols found while compiling are not found while linking.

Maybe it's because a lib is installed for 64 bits only and it means 32 bits here (i386 architecture).

Anyway it's your job to find the bad lib, it's probably muparser here.

If you installed it from source you might want to make

export CC="gcc -m32"

export CXX="g++ -m32"

and then re-run configure, make clean, make -j4.

to force a compilation for i386 and not amd64.

 

Good luck !

 

Sorry forgot you were building for an amd64 system, which makes thinks even more awkward.

 

EDIT : and it's probably related to this "universal" option in the package manager you used. I think you just passed this command line option without editing the configuration file as it was adviced, well it was probably not such a good idea.

Now I never used this package manager myself, so it's clearly the limit of what I can say about all this.

Edited by Tux
Posted

Re-read what I posted, you did something obviously wrong with muparser, probably linked to this "universal" setting, you are the only one who can fix it !

Posted (edited)

 

Re-read what I posted, you did something obviously wrong with muparser, probably linked to this "universal" setting, you are the only one who can fix it !

When I make clean, I saw this

 

 

TienHuusMacBook:muparser H2T$ make clean
rm -rf ./.deps ./.pch
rm -f ./*.o
rm -f ./lib/libmuparser.a
rm -f ./lib/libmuparser.2.2.4.dylib
rm -f ./lib/libmuparser.dylib
rm -f ./lib/libmuparser.dylib ./lib/libmuparser.2.dylib
rm -f ./samples/example1/example1
 

 

It means the file existed. I rebuilt the muparser and check libmuparser.a is in /usr/lib already.

 

 

TienHuusMacBook:muparser H2T$ sudo make install
Password:
/usr/bin/install -c -d /usr/local/lib
/usr/bin/install -c -m 644 ./lib/libmuparser.a /usr/local/lib
/usr/bin/install -c -d /usr/local
for f in include/muParser.h include/muParserBase.h include/muParserBytecode.h include/muParserCallback.h include/muParserDLL.h include/muParserDef.h include/muParserError.h include/muParserFixes.h include/muParserInt.h include/muParserStack.h include/muParserTemplateMagic.h include/muParserTest.h include/muParserToken.h include/muParserTokenReader.h; do \
if test ! -d /usr/local/`dirname $f` ; then \
/usr/bin/install -c -d /usr/local/`dirname $f`; \
fi; \
/usr/bin/install -c -m 644 ./$f /usr/local/$f; \
done
/usr/bin/install -c -d /usr/local/lib/pkgconfig
/usr/bin/install -c -m 644 build/autoconf/muparser.pc /usr/local/lib/pkgconfig
 

I try to remake Raine and it was built successfully.

 

 

rofile.o darwin-sdl/objectd/sdl/gen_conv.o darwin-sdl/objectd/sdl/sasound.o -lz /usr/local/lib/libpng.a -lm /usr/local/lib/libmuparser.a -framework SDL -framework SDL_ttf -framework SDL_image -framework Cocoa -framework OpenGL /usr/local/lib/libSDL_sound.a /usr/local/lib/libintl.a -liconv
 

 

Raine (Unix executable file) has been built. I copy this to overwrite in Raine app.

 

Wow, it worked like a charm. Play game perfectly. No crash like rrshier buid version.

 

Thanks a lot for your great support!

Edited by tien_huu_1408
  • 2 months later...
Posted (edited)

i have same problem.

 

i get follwing error when i run make

 

Linking Raine...
clang: error: no such file or directory: '/usr/local/lib/libmuparser.a'
make: *** [raine] Error 1
i tried make clean
make -j2
i tried to compile as 32bit with this:

export CC="gcc -m32"

export CXX="g++ -m32"

and then re-run configure, make clean, make -j4.

reinstalled muparser with brew reinstall muparser --universal

i reinstalled every package with brew, runned brew update, brew upgrade installed everything over and still get same error
i tried to change in the makefile to LIBS += -lmuparser on line 869
then i get following error:
Linking Raine...
ld: framework not found SDL
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [raine] Error 1

 

 

please help me!

Edited by bjrn
Posted (edited)

I didn't say that in the thread already ? The makefile is written to use specifically a static version of libmuparser.a because at the time I didn't find how to build a shared libmuparser for osx.

So... if you want to use a more standard muparser, you need to edit the makefile and replace this :

(starting at line 868 normally)

ifdef DARWIN
LIBS += /usr/local/lib/libmuparser.a
LIBS_DEBUG += /usr/local/lib/libmuparser.a
else
LIBS += -lmuparser
LIBS_DEBUG += -lmuparser
endif

by this :

LIBS += -lmuparser
LIBS_DEBUG += -lmuparser

... and for your framework not found, I suppose you followed the instructions from the readme.osx file so you got an installation without any framework, right ?

This setup is a real mess, the guy who did this stopped in a hurry and never came back, so he didn't even edit the makefile in git to remove the frameworks... anyway, then all you have to do is replace this

ifdef DARWIN
# Official SDL1.2 frameworks (SDL / image / ttf) in /Library/Frameworks
(around line 1072), by this :

ifndef DARWIN

 

This is a quick fix to force it to use generic unix rules here for darwin, which should be fine for what you have. Tell me if there is another error after that !

Good luck !

 

I got a new laptop lately which might be better at running osx, at least in a virtual machine, so I might be able to test all this again...

This build should really be more osx like, you download it, drag the icon, and it works, very far from that for now...

Edited by Tux
Posted

I got a little bit further now.

 

Got stucked by:

 

Assembling source/sdl/gen_conv.s...
source/sdl/gen_conv.s:40:10: error: invalid alignment value
.align 32
^
make: *** [darwin-sdl/object/sdl/gen_conv.o] Error 1
make: *** Waiting for unfinished jobs....
Posted (edited)

Tsss, you lost the -DDARWIN flag apparently !

Ok, so undo the change I told you to do in the previous post, I told you to put

ifndef DARWIN

so just put again

ifdef DARWIN

and then comment out the line related to frameworks below, this one :

LIBS += -framework SDL -framework SDL_ttf -framework SDL_image -framework Cocoa -framework OpenGL
and then comment out this one too :

else #DARWIN
so you'll have the darwin specific flags + the generic ones, and without the frameworks.

It might have been easier to just install the frameworks, that's probably what the previous person who posted here did, anyway now that you have started on this, we'll see where it leads !

 

this is a blind change since I can't test it, you might have some other problems when linking with this, we'll see later.

Eventually edit the makefile to uncomment the line

RAINE_DEBUG = 1

it will make your compilation much faster, and use make -j4 to compile if you have 4 cores in your cpu.

You'll need to run a make clean again after these changes, and restart the compilation from scratch...

Edited by Tux

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...