Jump to content
  • 0

[SOLVED]Ubuntuinstall [Two]


Necrovoice

Question

Hey everyone I seem to be having some issues following the Ubuntuinstall on the wiki.

Currently I am stuck at

git apply src/bindings/scripts/patches/MaNGOS-*-ScriptDev2.patch

when I run the above I get an error.

fatal: can't open patch 'src/bindings/scripts/patches/MaNGOS-*-ScriptDev2.patch': No such file or directory

I looked in the src/bindings/scripts directory and /patch/ is not listed.

Is this an old install guide or am I missing something?

I also looked at the advice given on the guide

"If you receive an error while applying the patch, just open src/bindings/CMakeList.txt with nano (or any other text editor) and comment out the line add_subdirectory(universal) and uncomment/add the line add_subdirectory(scripts) ."

That CmakeList.txt does not have a add_subdirectory(universal) line to comment out.

Thanks in advance

Link to comment
Share on other sites

Recommended Posts

Heya necrovoice,

I skipped the ScriptDev2.patch instruction last ubuntu install I did (some three days ago). I'm pretty sure that is an outdated instruction.

With regards to the CmakeList.txt, that is definitely outdated. There's an INCLUDE_BINDINGS_DIR compile option that you should use now instead of editing that file. See the general linux instructions on the wiki for details. https://github.com/mangoswiki/Wiki/wiki/Linuxinstall

when running cmake you'll have the additional text:

-DINCLUDE_BINDINGS_DIR=scripts

I've been trying to get the generic linux instructions up to date, and I think they're pretty close, so if you run into more problems, check there for different instructions than whats on the ubuntu instruction page.

Good luck!

Link to comment
Share on other sites

oh, and the directions for 'Extracting Game Assets' is sort of messed up in the wiki. The linux installation guide says to use /opt/mangos-server as the installation directory, but the extraction page says to copy all the maps, etc into /home/mangos/data. You need to make sure that you're putting the data somewhere you can find it again. It doesn't really matter where, but the mangosd program looks for those files in the directory you run mangosd from (the working directory when you run the file, which is not necessarily the directory containing mangosd). I made a directory /opt/mangos-server/data into which I copied maps, vmaps, etc and then in /opt/mangos-server/etc/mangosd.conf I set the DataDir setting to /opt/mangos-server/data so that I didn't have to cd to a specific directory every time I wanted to start the server. Personal preferences and configurations may vary.

Link to comment
Share on other sites

Thanks for the offer haruhi.

SO going back to the install, I did the command lind you suggested golond and I got an error that the cmake file was not found.

CMake Error: The source directory "/home/user/opt" does not appear to contain CMakeLists.txt. 

am I making the opt directory in the Cmake step in the wrong place, or did I need to move the cmake file?

Link to comment
Share on other sites

Hahah, the devil is in the details, it seems.

In my following description please keep in mind that these folder names are all sort of personal preference and could be almost anything, but following the instructions on the wiki you should have something at least similar in structure even if the names are slightly different.

Following the (sometimes conflicting) directions on the wiki, you should have 'git clone'-ed a bunch of files into a folder like /home/user/mangos then created a folder /home/user/mangos/obj into which you are trying to store the results of the 'cmake'.

Once the cmake is complete, you'll run a 'make' on the files that were created by 'cmake' in the /home/user/mangos/obj folder and they'll get put in /etc/mangos-server

Can you double-check the options to cmake? you're in the 'obj' directory you created? you included the '..' in the command (which tells cmake to begin looking for CMaleLists.txt files in the parent directory of the directory you're currently in)? Being in the wrong directory when you run that could screw up the attempt.

It seems like the directories you're trying to compile from and compile into are getting criss-crossed. I've never seen the /home/user/opt folder during my installs. Can you list out exactly the commands that you typed? What folder are your source files in, like where did you 'git' the repository to? What directory are you in when you run the cmake command? Does the error tell you what file CMake is processing when it gives you that error?

:) we'll get it working.

Link to comment
Share on other sites

Here is what I have currently (I see that yours seems to be a bit more stream line and I think this is where my problems are.

The information below is from the Ubuntu install

mkdir mangos

cd mangos

git clone git://github.com/mangos/server.git

cd server

git clone git://github.com/mangos/scripts.git src/bindings/scripts

git apply src/bindings/scripts/patches/MaNGOS-*-ScriptDev2.patch <I didnt do this part)

--------------------

This is where I started with the Linux install.

I was unsure where exactly /opt/mangos-server would be placed. so I made its own directoy from home.(sorry if my exact wording s wrong im new to this remember?)

ran chown on the above directory then continued on to the

then I made a directory with in the above called objdir and this gave me. /opt/mangos-server/objdir

then once I ran

cmake .. -DCMAKE_INSTALL_PREFIX=/opt/mangos-server -DINCLUDE_BINDINGS_DIR=scripts

If gave me the error.

these files are not in the original mangos folder.

Link to comment
Share on other sites

Ah, I see your problem. In linux it is very important to keep track of whether a file path has a leading '/' or not. If it does, that always means that you're starting from the root of your file system, much like c:/ means in windows If the path does NOT have a leading '/' character, it is considered a relative path to your current working directory. The /opt/mangos-server should not have been created under your home directory (it sounds like you created /home/user/opt/mangos by doing something like

cd /home/user

mkdir opt/mangos

The instruction from the wiki

mkdir /opt/mangos

will actually create a mangos subfolder under the already existing /opt directory that exists in your default Ubuntu installation.

You should remove the /home/user/opt folder and any contents (the obj subfolder), properly create /opt/mangos, then create /home/user/mangos/server/obj and you should be back on track.

I notice that the wiki instructions do not take into account the possibility that someone used the cd command to move to a different directory half-way through the process. You should be sitting in the /home/user/mangos/server/obj directory when you run cmake, causing the '..' part of the command to start searching for CMakeLists.txt in the parent directory of your working directory, or '/home/user/mangos/server'.

Remember that since you started with the Ubuntu instructions then shifted to the generic linux instructions your folder names might be slightly different than the instructions you're using (server/obj vs server/objdir and /opt/mangos vs /opt/mangos-server). You have to be aware of this potential difference and use the same path consistently even if the directions say something different.

Link to comment
Share on other sites

@SERVER~/mangos/server/obj$ sudo cmake .. -DCMAKE_INSTALL_PREFIX=/opt/mangos-server -DINCLUDE_BINDINGS_DIR=scripts

This script builds the MaNGOS server.

Options that can be used in order to configure the process:

CMAKE_INSTALL_PREFIX Path where the server should be installed to

CMAKE_BUILD_TYPE Sets build type (Release;Debug;...)

PCH Use precompiled headers

INCLUDE_BINDINGS_DIR Include a script library in src/bindings/ with the

defined name. the name must corespond to the name of

the folder and the folder must contain a valid

CMakeLists.txt

ACE_USE_EXTERNAL Use external ACE

To set an option simply type -D<OPTION>=<VALUE> after 'cmake <srcs>'.

Also, you can specify the generator with -G. see 'cmake --help' for more details

For example: cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/opt/mangos

-- Detected 32-bit platform.

-- Using mysql-config: /usr/bin/mysql_config

-- Found MySQL library: /usr/lib/i386-linux-gnu/libmysqlclient_r.so

-- Found MySQL headers: /usr/include/mysql

-- Found OpenSSL library: /usr/lib/i386-linux-gnu/libssl.so

-- Found OpenSSL headers: /usr/include/openssl

-- Found ZLIB: /usr/lib/i386-linux-gnu/libz.so (found version "1.2.3.4")

-- MaNGOS-Core revision : 911faf153a33132b7a0705399f4118ebf3bb66d4

-- Install server to : /opt/mangos-server

-- Use PCH : No

-- Configuring done

-- Generating done

-- Build files have been written to: /home/user/mangos/server/obj

~/mangos/server/obj$ ll

total 60

drwxr-xr-x 5 tim tim 4096 Mar 1 17:52 ./

drwxr-xr-x 11 root root 4096 Mar 1 17:43 ../

-rw-r--r-- 1 root root 13471 Mar 1 17:52 CMakeCache.txt

drwxr-xr-x 8 root root 4096 Mar 1 17:52 CMakeFiles/

-rw-r--r-- 1 root root 1850 Mar 1 17:52 cmake_install.cmake

-rw-r--r-- 1 root root 927 Mar 1 17:52 cmake_uninstall.cmake

-rw-r--r-- 1 root root 163 Mar 1 17:52 config.h

drwxr-xr-x 6 root root 4096 Mar 1 17:52 dep/

-rw-r--r-- 1 root root 12017 Mar 1 17:52 Makefile

drwxr-xr-x 9 root root 4096 Mar 1 17:52 src/

@SERVER:~/mangos/server/obj$

Link to comment
Share on other sites

does that look right?

Also my wow client is on a windows pc, next question and I hope my last for now is can I build the extraction tools on Linux then just move them over to the wondows pc and use them that way, or should I pull them on windows and use it there for the extraction and just move them to the Linux server?

hope that makes sense

Link to comment
Share on other sites

ok so I ran the ad.exe and the vmapExtractor.exe. it created buildings, dbc and maps. but no vmaps folder. was this done away with or am I missing something again? I tried to run vmap_assembler.exe but it flashed open a window and closed just as quick. I remember before about a .bat file and the wiki says to run one, but I could not find the make_vmaps.bat file.

It really cant be that hard.. or I cant be missing that much.

I found an old help post regarding the assembler doing the same thing mine is doing, but from what I gather their "fix" was what I did to begin with.

Link to comment
Share on other sites

It seems to me like you must have double-clicked on the vmap_assembler.exe icon instead of running it from a command prompt? Open a dos prompt, cd to the folder where vmap_assembler.exe is, and type

vmap_assembler.exe

It should output a line of text that tells you what the proper usage is

usage: vmap_assembler.exe <raw data dir> <vmap dest dir>

So, to actually get your vmaps folder populated, you first need to have that folder created

mkdir vmaps

then execute vmap_assembler.exe

vmap_assembler.exe Buildings vmaps

Since you're running this from the command prompt there shouldn't be any 'window flashing', and all feedback output will be to the terminal (and hopefully file outputs to the vmaps folder).

Link to comment
Share on other sites

Just an update I had a typeo in my cmake .. -DCMAKE_INSTALL_PREFIX=/opt/mangos-server -DINCLUDE_BINDINGS_DIR=scripts, so I started from step one again and updated the =/opt/mangos-server to the correct, =/opt/mangos

now I checked the /opt/mangos folder and its still empty. shouldn't there be a bin folder?

Link to comment
Share on other sites

If I remember correctly, the 'cmake' should populate /home/user/mangos/server/obj with files, then the 'make' should do a bunch of compiling into /opt/mangos (including /opt/mangos/bin), and then 'make install' should copy some additional config stuff into /opt/mangos.

I think.

Did your make commands work without giving a compile error?

Link to comment
Share on other sites

[ 1%] Built target genrev

[ 1%] Built target revision.h

[ 2%] Built target ACE_Project

[ 3%] Built target detour

[ 9%] Built target g3dlite

[ 9%] Built target gsoap

[ 9%] Built target framework

[ 13%] Built target shared

[ 13%] Built target realmd

[ 36%] Built target game

[ 37%] Built target mangosd

[100%] Built target mangosscript

Install the project...

-- Install configuration: ""

-- Up-to-date: /opt/mangos/bin/realmd

-- Up-to-date: /opt/mangos/etc/realmd.conf.dist

-- Up-to-date: /opt/mangos/bin/mangosd

-- Up-to-date: /opt/mangos/bin/run-mangosd

-- Up-to-date: /opt/mangos/etc/mangosd.conf.dist

-- Installing: /opt/mangos/lib/libmangosscript.so

-- Set runtime path of "/opt/mangos/lib/libmangosscript.so" to "/opt/mangos/lib:/opt/mangos/lib"

-- Installing: /opt/mangos/etc/scriptdev2.conf.dist

with no errors, yet opt/mangos remains empty. maybe something will come to me tonight when im sleeping. thanks for your help so far.

Link to comment
Share on other sites

The only thing that comes to mind as a possibility is that you don't have permissions to view the contents of /opt/mangos. But that doesnt really make sense unless you were using 'sudo' when running make. Did you run chown after your mkdir /opt/mangos? Can you see the folder contents if you type

sudo ls -l /opt/mangos

?

Link to comment
Share on other sites

Heya,

Sorry, but I'm going to ask some really specific questions just to be absolutely clear about where things stand. It sounds to me like you are not logged in as the user 'user', who is the owner of /opt/mangos. When you ran 'make' using 'sudo', you had root user permissions which can write to any directory it wants to, but when trying to read /opt/mangos as non-'root', non-'user', you don't have permission.

When you say you can see bin, etc, include, lib, that was from running

sudo -ls -l /opt/mangos

?

Who are you logged in as?

id -u -n

What is the exact command you are running when you see

drwxr-xr-x 2 user user 4096 Mar 1 21:08 mangos/

?

It sounds to me like if you run

chown -R /opt/mangos YOURLOGIN

that you'll be able to see the contents

Link to comment
Share on other sites

wow was a very n00b mistake on why, I was not in the correct folders.. I needed to be at the core(root) folder /opt I was in opt/ so now I fond where I need to be :)

Its ok that ya make it simple steps for me.

when I am at

tim@SERVER:~/opt$

I run ll (LL) and got the line

drwxr-xr-x 2 user user 4096 Mar 1 21:08 mangos/

when I am in the directory /opt/mangos and run

sudo ls -l /opt/mangos

I get the following

total 16

drwxrwxr-x 2 tim tim 4096 Mar 1 22:39 bin

drwxrwxr-x 2 tim tim 4096 Mar 1 22:41 etc

drwxr-xr-x 3 root root 4096 Mar 1 22:11 include

drwxr-xr-x 3 root root 4096 Mar 1 22:41 lib

ll returns nothing.

(chown -R /opt/mangos YOURLOGIN)? didnt work

I ran

sudo chown -R tim:tim /opt/mangos

and I am still unable to view the contents of mangos.

--------------

My friend told me to run ls -la in the opt/mangos folder

when I did that I was able to see and access the folders. but once I close the terminal and go back I lost all access to it again.

Link to comment
Share on other sites

This is very peculiar, and the only thing I can imagine is that when you're typing commands you're alternating between accessing /opt/mangos and ~/opt/mangos. As you work, be very aware of what directory you are in (your working directory) and what directory you are performing actions on (whether there is a leading '/' or not in the directory you type in to the command makes a HUGE difference)

logging in fresh and typing

ls opt/mangos

then

ls /opt/mangos

will list out the contents of two different directories.

the symbol ~ is a special shortcut character and means you are in the current user's home directory. The default directory when you log on is ~. In your case, ~ would be the same as the absolute path /home/user/tim.

It sounds like you have a folder /home/user/tim/mangos/opt/mangos that you are confusing for /opt/mangos. The /home/user/tim/mangos/opt/mangos folder would be empty because it is not part of the installation, and was created erroneously. You should delete it as well as /home/user/tim/mangos/opt, which I believe is also not part of the installation process.

rmdir ~/opt/mangos

rmdir ~/opt

please don't use the 'll' command for now. It's probably an alias that just runs 'ls -l', but I don't know that for sure, and its just one more level of complication that we should eliminate from the troubleshooting.

if you run

man ls

You'll see that the -a option to the ls command simply allows files beginning with a '.' to display in the list results. This has no effect whatsoever on file permissions of the list itself or of the terminal session you are in. Closing the terminal and reopening it should have no effect on what files you can see unless you have at some point changed what user you are (like using the 'login' or 'sudo' command).

At this point the only time you should be using sudo to chown the /opt/mangos folder to give permissions to user 'tim', which is sounds like has already been done. tim should then be able to access /opt/mangos without any permission issues.

Run

ls -l /opt/mangos

again and see if your previous chown worked. I know you pasted some ls -l results before, but the owner of some of those folders was still 'root', not 'tim'. It seemed like that was from before your most recent chown attempt though.

Link to comment
Share on other sites

Thanks for all your help, I am now able and have already set up my .conf files. I am getting ready to get the DB set up, something that I sure hope don't give me any headach. But again I am very greatfull for your help up to this point. It has been a learning experience. Something that Mangos has been to me time and time again.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use