Bug #844

Fix various things in the Linux build

Added by liveriondev over 8 years ago. Updated about 8 years ago.

Status:Closed Start date:05/06/2010
Priority:Normal Due date:
Assignee:vl % Done:

100%

Category:Build
Target version:Version 0.8.0

Description

There are some bugs when running the make_all command. Here is a patch to fix them.

It affects the build, buildmode, make_all and utilities files in the code/ryzom/tools/scripts/linux directory.

  • build

    - define $SRC_DIR using the now exported $RYZOM_PATH.
    - move all mode files to $RYZOM_PATH instead of $HOME (cleaner).

  • buildmode

    - move all mode files to $RYZOM_PATH instead of $HOME (again).

  • make_all

    - export $RYZOM_PATH ; this allows usage from external called scripts.

  • utilities

    - move all logs from $HOME to $RYZOM_PATH.
    - remove the "function" keyword. With bash, the reserved word "function" is optional. But in Debian, /bin/sh is dash and this keyword is not allowed here.
    - make sure the directory for logs exists ; if not, it is created.

scripts.patch (5.1 kB) Magnifier liveriondev, 05/06/2010 10:43 pm

build.patch (1 kB) Magnifier liveriondev, 05/08/2010 02:41 pm

Makefiles.patch (19.1 kB) Magnifier liveriondev, 05/08/2010 02:41 pm

History

#1 Updated by vl over 8 years ago

  • Status changed from New to Assigned
  • Assignee set to vl
  • Target version set to Version 0.8.0

Thank you for the patch.

The thing is that "build" should be launched from the command line without calling "make_all". With your patch, "build" will not work because $RYZOM_PATH was not defined if not launched with "make_all".

Would you like to add a test in build that check if $RYZOM_PATH exists and if not, then use the default $HOME/code path or ask user to enter the path?

#2 Updated by jayme over 8 years ago

Maybe we should also export SRC_DIR in "build" (if not already exported) so that we can use it in Variables.mk:

diff -r 44a762e71d6e code/ryzom/Variables.mk
--- a/code/ryzom/Variables.mk   Fri May 07 09:28:05 2010 +0200
+++ b/code/ryzom/Variables.mk   Fri May 07 16:42:11 2010 +0200
@@ -20,12 +20,11 @@
 DIR_DBG_on    = debug
 DIR_DBG_off   = release

-PACK_SHEETS_FLAGS = -A/home/nevrax/code/ryzom/server -L/home/nevrax/code/ryzom/server -C/home/nevrax/code/ryzom/server/sheet_pack_cfg -Q --nons
+PACK_SHEETS_FLAGS = -A$(SRC_DIR)/ryzom/server -L$(SRC_DIR)ryzom/server -C$(SRC_DIR)/ryzom/server/sheet_pack_cfg -Q --nons

-NEL_PATH = $(HOME)/code/install/$(DIR_DBG_$(DBG))
-RYZOM_PATH = $(HOME)/code/ryzom
+NEL_PATH = $(SRC_DIR)/install/$(DIR_DBG_$(DBG))

-NEL_INCLUDE = $(HOME)/code/nel/include
+NEL_INCLUDE = $(SRC_DIR)/nel/include
 RYZOM_COMMON_SRC = $(RYZOM_PATH)/common/src

 ifeq (Objects.mk,$(wildcard Objects.mk))

#3 Updated by liveriondev over 8 years ago

Please find enclosed a new patch for the build utility.

I'm also attaching a patch that I use to make all Makefiles use $(RYZOM_PATH) instead of $(HOME)/code or $(HOME)/cvs/code.

#4 Updated by liveriondev over 8 years ago

By the way, I also set the -j12 argument to a lower value for building the server.

As each instance of c++ uses about 300mb of RAM for processing some files, -j12 made my system swap a lot, and thus made it freeze without making any progress in the compilation.

#5 Updated by kerozcak over 8 years ago

I had to change MAKE_OPTS to -j2 too for the same reason. It would be nice if we could set this in one place, not in each Makefile :)

#6 Updated by vl over 8 years ago

  • Status changed from Assigned to Resolved

I applied these changes. It should work following this :

http://dev.ryzom.com/wiki/ryzom/BuildForLinux

#7 Updated by vl over 8 years ago

  • % Done changed from 0 to 100

#8 Updated by vl about 8 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF