Re: Howto apply a patch/diff file
Posted: 20 Jul 2008 16:02
I only used "make" with no spaces and no luck
The place to talk about Transport Tycoon
https://www.tt-forums.net/
amirtaheri wrote:I only used "make" with no spaces and no luck
Yexo wrote:Don't use a path with spaces in it. Btw, "make" should do, instead of "make build"
The directory "openttd amirtaheri" contains a space. i was refering to that space (in the path).amirtaheri wrote:Macbook:/users/amirtaheri/openttd amirtaheri$ make build
Then I've no more idea how to solve your problem.amirtaheri wrote:That isn't something I can change. The actual folder is just OpenTTD
The structure is /users/amirtaheri/openttd
That amirtaheri$ is part of the Terminal application prompt I think.
What's the output of pwd?amirtaheri wrote:That amirtaheri$ is part of the Terminal application prompt I think.
Code: Select all
WARNING: you enabled distcc support, but you don't seem to be using the -jN paramter
[LANG] Compiling string.cpp
In file included from /users/amirtaheri/openttd/src/string.cpp:6:
/users/amirtaheri/openttd/src/openttd.h:11:17: error: hal.h: No such file or directory
/users/amirtaheri/openttd/src/openttd.h:12:23: error: helpers.hpp: No such file or directory
In file included from /usr/include/c++/4.0.0/backward/map.h:59,
from /users/amirtaheri/openttd/src/openttd.h:29,
from /users/amirtaheri/openttd/src/string.cpp:6:
/usr/include/c++/4.0.0/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
In file included from /users/amirtaheri/openttd/src/string.cpp:6:
/users/amirtaheri/openttd/src/openttd.h:30:19: error: slope.h: No such file or directory
/users/amirtaheri/openttd/src/string.cpp:9:25: error: string_func.h: No such file or directory
/users/amirtaheri/openttd/src/openttd.h:137: error: expected constructor, destructor, or type conversion before ';' token
/users/amirtaheri/openttd/src/openttd.h:140: error: 'EnumPropsT' is not a template
/users/amirtaheri/openttd/src/openttd.h:140: error: expected template-name before '<' token
/users/amirtaheri/openttd/src/openttd.h:140: error: expected `{' before '<' token
/users/amirtaheri/openttd/src/openttd.h:140: error: expected unqualified-id before '<' token
/users/amirtaheri/openttd/src/openttd.h:141: error: expected initializer before '<' token
/users/amirtaheri/openttd/src/openttd.h:142: error: 'OwnerByte' does not name a type
/users/amirtaheri/openttd/src/openttd.h:161: error: 'EnumPropsT' is not a template
/users/amirtaheri/openttd/src/openttd.h:161: error: 'EnumPropsT' is not a template type
/users/amirtaheri/openttd/src/openttd.h:161: error: expected template-name before '<' token
/users/amirtaheri/openttd/src/openttd.h:161: error: expected `{' before '<' token
/users/amirtaheri/openttd/src/openttd.h:161: error: expected unqualified-id before '<' token
/users/amirtaheri/openttd/src/openttd.h:162: error: expected initializer before '<' token
/users/amirtaheri/openttd/src/openttd.h:168: error: 'Slope' does not name a type
/users/amirtaheri/openttd/src/openttd.h:169: error: 'TileIndex' does not name a type
/users/amirtaheri/openttd/src/openttd.h:219: error: 'EnumPropsT' is not a template
/users/amirtaheri/openttd/src/openttd.h:219: error: 'EnumPropsT' is not a template type
/users/amirtaheri/openttd/src/openttd.h:219: error: expected template-name before '<' token
/users/amirtaheri/openttd/src/openttd.h:219: error: expected `{' before '<' token
/users/amirtaheri/openttd/src/openttd.h:219: error: expected unqualified-id before '<' token
/users/amirtaheri/openttd/src/openttd.h:220: error: expected initializer before '<' token
/users/amirtaheri/openttd/src/openttd.h:363: error: typedef 'GetSlopeZProc' is initialized (use __typeof__ instead)
/users/amirtaheri/openttd/src/openttd.h:363: error: 'TileIndex' was not declared in this scope
/users/amirtaheri/openttd/src/openttd.h:363: error: expected primary-expression before 'x'
/users/amirtaheri/openttd/src/openttd.h:363: error: expected primary-expression before 'y'
/users/amirtaheri/openttd/src/openttd.h:364: error: typedef 'ClearTileProc' is initialized (use __typeof__ instead)
/users/amirtaheri/openttd/src/openttd.h:364: error: 'TileIndex' was not declared in this scope
/users/amirtaheri/openttd/src/openttd.h:364: error: expected primary-expression before 'flags'
/users/amirtaheri/openttd/src/openttd.h:365: error: typedef 'GetAcceptedCargoProc' is initialized (use __typeof__ instead)
/users/amirtaheri/openttd/src/openttd.h:365: error: 'TileIndex' was not declared in this scope
/users/amirtaheri/openttd/src/openttd.h:365: error: expected primary-expression before 'res'
/users/amirtaheri/openttd/src/openttd.h:366: error: typedef 'GetTileDescProc' is initialized (use __typeof__ instead)
/users/amirtaheri/openttd/src/openttd.h:366: error: 'TileIndex' was not declared in this scope
/users/amirtaheri/openttd/src/openttd.h:366: error: expected primary-expression before '*' token
/users/amirtaheri/openttd/src/openttd.h:366: error: 'td' was not declared in this scope
/users/amirtaheri/openttd/src/openttd.h:391: error: typedef 'GetTileTrackStatusProc' is initialized (use __typeof__ instead)
/users/amirtaheri/openttd/src/openttd.h:391: error: 'TileIndex' was not declared in this scope
/users/amirtaheri/openttd/src/openttd.h:391: error: expected primary-expression before 'mode'
/users/amirtaheri/openttd/src/openttd.h:391: error: expected primary-expression before 'sub_mode'
/users/amirtaheri/openttd/src/openttd.h:392: error: typedef 'GetProducedCargoProc' is initialized (use __typeof__ instead)
/users/amirtaheri/openttd/src/openttd.h:392: error: 'TileIndex' was not declared in this scope
/users/amirtaheri/openttd/src/openttd.h:392: error: expected primary-expression before '*' token
/users/amirtaheri/openttd/src/openttd.h:392: error: 'b' was not declared in this scope
/users/amirtaheri/openttd/src/openttd.h:393: error: typedef 'ClickTileProc' is initialized (use __typeof__ instead)
/users/amirtaheri/openttd/src/openttd.h:393: error: 'TileIndex' was not declared in this scope
/users/amirtaheri/openttd/src/openttd.h:394: error: typedef 'AnimateTileProc' is initialized (use __typeof__ instead)
/users/amirtaheri/openttd/src/openttd.h:394: error: 'TileIndex' was not declared in this scope
/users/amirtaheri/openttd/src/openttd.h:395: error: typedef 'TileLoopProc' is initialized (use __typeof__ instead)
/users/amirtaheri/openttd/src/openttd.h:395: error: 'TileIndex' was not declared in this scope
/users/amirtaheri/openttd/src/openttd.h:396: error: typedef 'ChangeTileOwnerProc' is initialized (use __typeof__ instead)
/users/amirtaheri/openttd/src/openttd.h:396: error: 'TileIndex' was not declared in this scope
/users/amirtaheri/openttd/src/openttd.h:396: error: expected primary-expression before 'old_player'
/users/amirtaheri/openttd/src/openttd.h:396: error: expected primary-expression before 'new_player'
/users/amirtaheri/openttd/src/openttd.h:398: error: 'TileIndex' has not been declared
/users/amirtaheri/openttd/src/openttd.h:399: error: 'Slope' does not name a type
/users/amirtaheri/openttd/src/openttd.h:414: error: ISO C++ forbids declaration of 'GetSlopeTilehProc' with no type
/users/amirtaheri/openttd/src/openttd.h:414: error: expected ';' before '*' token
/users/amirtaheri/openttd/src/openttd.h:582: error: typedef 'PlaceProc' is initialized (use __typeof__ instead)
/users/amirtaheri/openttd/src/openttd.h:582: error: 'TileIndex' was not declared in this scope
/users/amirtaheri/openttd/src/string.cpp: In function 'char* strecat(char*, const char*, const char*)':
/users/amirtaheri/openttd/src/string.cpp:41: error: 'strecpy' was not declared in this scope
/users/amirtaheri/openttd/src/string.cpp: In function 'void str_validate(char*)':
/users/amirtaheri/openttd/src/string.cpp:80: error: 'WChar' was not declared in this scope
/users/amirtaheri/openttd/src/string.cpp:80: error: expected `;' before 'c'
/users/amirtaheri/openttd/src/string.cpp:83: error: 'c' was not declared in this scope
/users/amirtaheri/openttd/src/string.cpp:83: error: 'Utf8Decode' was not declared in this scope
/users/amirtaheri/openttd/src/string.cpp:84: error: 'IsPrintable' was not declared in this scope
/users/amirtaheri/openttd/src/string.cpp:85: error: 'CS_ALPHANUMERAL' was not declared in this scope
/users/amirtaheri/openttd/src/string.cpp:85: error: 'IsValidChar' was not declared in this scope
/users/amirtaheri/openttd/src/string.cpp: In function 'void str_strip_colours(char*)':
/users/amirtaheri/openttd/src/string.cpp:106: error: 'WChar' was not declared in this scope
/users/amirtaheri/openttd/src/string.cpp:106: error: expected `;' before 'c'
/users/amirtaheri/openttd/src/string.cpp:109: error: 'c' was not declared in this scope
/users/amirtaheri/openttd/src/string.cpp:109: error: 'Utf8Decode' was not declared in this scope
/users/amirtaheri/openttd/src/string.cpp: At global scope:
/users/amirtaheri/openttd/src/string.cpp:145: error: 'WChar' was not declared in this scope
/users/amirtaheri/openttd/src/string.cpp:145: error: 'CharSetFilter' was not declared in this scope
/users/amirtaheri/openttd/src/string.cpp:145: error: initializer expression list treated as compound expression
/users/amirtaheri/openttd/src/string.cpp:146: error: expected ',' or ';' before '{' token
/users/amirtaheri/openttd/src/string.cpp:215: error: 'WChar' was not declared in this scope
/users/amirtaheri/openttd/src/string.cpp:215: error: 'c' was not declared in this scope
/users/amirtaheri/openttd/src/string.cpp:215: error: expected primary-expression before 'const'
/users/amirtaheri/openttd/src/string.cpp:215: error: initializer expression list treated as compound expression
/users/amirtaheri/openttd/src/string.cpp:216: error: expected ',' or ';' before '{' token
/users/amirtaheri/openttd/src/string.cpp:254: error: 'WChar' has not been declared
/users/amirtaheri/openttd/src/string.cpp: In function 'size_t Utf8Encode(char*, int)':
/users/amirtaheri/openttd/src/string.cpp:260: error: 'GB' was not declared in this scope
/users/amirtaheri/openttd/src/string.cpp:264: error: 'GB' was not declared in this scope
/users/amirtaheri/openttd/src/string.cpp:269: error: 'GB' was not declared in this scope
/users/amirtaheri/openttd/src/string.cpp: In function 'size_t Utf8TrimString(char*, size_t)':
/users/amirtaheri/openttd/src/string.cpp:293: error: 'Utf8EncodedCharLen' was not declared in this scope
make[1]: *** [string.o] Error 1
make -C /users/amirtaheri/openttd/objs/lang table/strings.h
[LANG] Compiling string.cpp
In file included from /users/amirtaheri/openttd/src/string.cpp:6:
/users/amirtaheri/openttd/src/openttd.h:11:17: error: hal.h: No such file or directory
/users/amirtaheri/openttd/src/openttd.h:12:23: error: helpers.hpp: No such file or directory
In file included from /usr/include/c++/4.0.0/backward/map.h:59,
from /users/amirtaheri/openttd/src/openttd.h:29,
from /users/amirtaheri/openttd/src/string.cpp:6:
/usr/include/c++/4.0.0/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
In file included from /users/amirtaheri/openttd/src/string.cpp:6:
/users/amirtaheri/openttd/src/openttd.h:30:19: error: slope.h: No such file or directory
/users/amirtaheri/openttd/src/string.cpp:9:25: error: string_func.h: No such file or directory
/users/amirtaheri/openttd/src/openttd.h:137: error: expected constructor, destructor, or type conversion before ';' token
/users/amirtaheri/openttd/src/openttd.h:140: error: 'EnumPropsT' is not a template
/users/amirtaheri/openttd/src/openttd.h:140: error: expected template-name before '<' token
/users/amirtaheri/openttd/src/openttd.h:140: error: expected `{' before '<' token
/users/amirtaheri/openttd/src/openttd.h:140: error: expected unqualified-id before '<' token
/users/amirtaheri/openttd/src/openttd.h:141: error: expected initializer before '<' token
/users/amirtaheri/openttd/src/openttd.h:142: error: 'OwnerByte' does not name a type
/users/amirtaheri/openttd/src/openttd.h:161: error: 'EnumPropsT' is not a template
/users/amirtaheri/openttd/src/openttd.h:161: error: 'EnumPropsT' is not a template type
/users/amirtaheri/openttd/src/openttd.h:161: error: expected template-name before '<' token
/users/amirtaheri/openttd/src/openttd.h:161: error: expected `{' before '<' token
/users/amirtaheri/openttd/src/openttd.h:161: error: expected unqualified-id before '<' token
/users/amirtaheri/openttd/src/openttd.h:162: error: expected initializer before '<' token
/users/amirtaheri/openttd/src/openttd.h:168: error: 'Slope' does not name a type
/users/amirtaheri/openttd/src/openttd.h:169: error: 'TileIndex' does not name a type
/users/amirtaheri/openttd/src/openttd.h:219: error: 'EnumPropsT' is not a template
/users/amirtaheri/openttd/src/openttd.h:219: error: 'EnumPropsT' is not a template type
/users/amirtaheri/openttd/src/openttd.h:219: error: expected template-name before '<' token
/users/amirtaheri/openttd/src/openttd.h:219: error: expected `{' before '<' token
/users/amirtaheri/openttd/src/openttd.h:219: error: expected unqualified-id before '<' token
/users/amirtaheri/openttd/src/openttd.h:220: error: expected initializer before '<' token
/users/amirtaheri/openttd/src/openttd.h:363: error: typedef 'GetSlopeZProc' is initialized (use __typeof__ instead)
/users/amirtaheri/openttd/src/openttd.h:363: error: 'TileIndex' was not declared in this scope
/users/amirtaheri/openttd/src/openttd.h:363: error: expected primary-expression before 'x'
/users/amirtaheri/openttd/src/openttd.h:363: error: expected primary-expression before 'y'
/users/amirtaheri/openttd/src/openttd.h:364: error: typedef 'ClearTileProc' is initialized (use __typeof__ instead)
/users/amirtaheri/openttd/src/openttd.h:364: error: 'TileIndex' was not declared in this scope
/users/amirtaheri/openttd/src/openttd.h:364: error: expected primary-expression before 'flags'
/users/amirtaheri/openttd/src/openttd.h:365: error: typedef 'GetAcceptedCargoProc' is initialized (use __typeof__ instead)
/users/amirtaheri/openttd/src/openttd.h:365: error: 'TileIndex' was not declared in this scope
/users/amirtaheri/openttd/src/openttd.h:365: error: expected primary-expression before 'res'
/users/amirtaheri/openttd/src/openttd.h:366: error: typedef 'GetTileDescProc' is initialized (use __typeof__ instead)
/users/amirtaheri/openttd/src/openttd.h:366: error: 'TileIndex' was not declared in this scope
/users/amirtaheri/openttd/src/openttd.h:366: error: expected primary-expression before '*' token
/users/amirtaheri/openttd/src/openttd.h:366: error: 'td' was not declared in this scope
/users/amirtaheri/openttd/src/openttd.h:391: error: typedef 'GetTileTrackStatusProc' is initialized (use __typeof__ instead)
/users/amirtaheri/openttd/src/openttd.h:391: error: 'TileIndex' was not declared in this scope
/users/amirtaheri/openttd/src/openttd.h:391: error: expected primary-expression before 'mode'
/users/amirtaheri/openttd/src/openttd.h:391: error: expected primary-expression before 'sub_mode'
/users/amirtaheri/openttd/src/openttd.h:392: error: typedef 'GetProducedCargoProc' is initialized (use __typeof__ instead)
/users/amirtaheri/openttd/src/openttd.h:392: error: 'TileIndex' was not declared in this scope
/users/amirtaheri/openttd/src/openttd.h:392: error: expected primary-expression before '*' token
/users/amirtaheri/openttd/src/openttd.h:392: error: 'b' was not declared in this scope
/users/amirtaheri/openttd/src/openttd.h:393: error: typedef 'ClickTileProc' is initialized (use __typeof__ instead)
/users/amirtaheri/openttd/src/openttd.h:393: error: 'TileIndex' was not declared in this scope
/users/amirtaheri/openttd/src/openttd.h:394: error: typedef 'AnimateTileProc' is initialized (use __typeof__ instead)
/users/amirtaheri/openttd/src/openttd.h:394: error: 'TileIndex' was not declared in this scope
/users/amirtaheri/openttd/src/openttd.h:395: error: typedef 'TileLoopProc' is initialized (use __typeof__ instead)
/users/amirtaheri/openttd/src/openttd.h:395: error: 'TileIndex' was not declared in this scope
/users/amirtaheri/openttd/src/openttd.h:396: error: typedef 'ChangeTileOwnerProc' is initialized (use __typeof__ instead)
/users/amirtaheri/openttd/src/openttd.h:396: error: 'TileIndex' was not declared in this scope
/users/amirtaheri/openttd/src/openttd.h:396: error: expected primary-expression before 'old_player'
/users/amirtaheri/openttd/src/openttd.h:396: error: expected primary-expression before 'new_player'
/users/amirtaheri/openttd/src/openttd.h:398: error: 'TileIndex' has not been declared
/users/amirtaheri/openttd/src/openttd.h:399: error: 'Slope' does not name a type
/users/amirtaheri/openttd/src/openttd.h:414: error: ISO C++ forbids declaration of 'GetSlopeTilehProc' with no type
/users/amirtaheri/openttd/src/openttd.h:414: error: expected ';' before '*' token
/users/amirtaheri/openttd/src/openttd.h:582: error: typedef 'PlaceProc' is initialized (use __typeof__ instead)
/users/amirtaheri/openttd/src/openttd.h:582: error: 'TileIndex' was not declared in this scope
/users/amirtaheri/openttd/src/string.cpp: In function 'char* strecat(char*, const char*, const char*)':
/users/amirtaheri/openttd/src/string.cpp:41: error: 'strecpy' was not declared in this scope
/users/amirtaheri/openttd/src/string.cpp: In function 'void str_validate(char*)':
/users/amirtaheri/openttd/src/string.cpp:80: error: 'WChar' was not declared in this scope
/users/amirtaheri/openttd/src/string.cpp:80: error: expected `;' before 'c'
/users/amirtaheri/openttd/src/string.cpp:83: error: 'c' was not declared in this scope
/users/amirtaheri/openttd/src/string.cpp:83: error: 'Utf8Decode' was not declared in this scope
/users/amirtaheri/openttd/src/string.cpp:84: error: 'IsPrintable' was not declared in this scope
/users/amirtaheri/openttd/src/string.cpp:85: error: 'CS_ALPHANUMERAL' was not declared in this scope
/users/amirtaheri/openttd/src/string.cpp:85: error: 'IsValidChar' was not declared in this scope
/users/amirtaheri/openttd/src/string.cpp: In function 'void str_strip_colours(char*)':
/users/amirtaheri/openttd/src/string.cpp:106: error: 'WChar' was not declared in this scope
/users/amirtaheri/openttd/src/string.cpp:106: error: expected `;' before 'c'
/users/amirtaheri/openttd/src/string.cpp:109: error: 'c' was not declared in this scope
/users/amirtaheri/openttd/src/string.cpp:109: error: 'Utf8Decode' was not declared in this scope
/users/amirtaheri/openttd/src/string.cpp: At global scope:
/users/amirtaheri/openttd/src/string.cpp:145: error: 'WChar' was not declared in this scope
/users/amirtaheri/openttd/src/string.cpp:145: error: 'CharSetFilter' was not declared in this scope
/users/amirtaheri/openttd/src/string.cpp:145: error: initializer expression list treated as compound expression
/users/amirtaheri/openttd/src/string.cpp:146: error: expected ',' or ';' before '{' token
/users/amirtaheri/openttd/src/string.cpp:215: error: 'WChar' was not declared in this scope
/users/amirtaheri/openttd/src/string.cpp:215: error: 'c' was not declared in this scope
/users/amirtaheri/openttd/src/string.cpp:215: error: expected primary-expression before 'const'
/users/amirtaheri/openttd/src/string.cpp:215: error: initializer expression list treated as compound expression
/users/amirtaheri/openttd/src/string.cpp:216: error: expected ',' or ';' before '{' token
/users/amirtaheri/openttd/src/string.cpp:254: error: 'WChar' has not been declared
/users/amirtaheri/openttd/src/string.cpp: In function 'size_t Utf8Encode(char*, int)':
/users/amirtaheri/openttd/src/string.cpp:260: error: 'GB' was not declared in this scope
/users/amirtaheri/openttd/src/string.cpp:264: error: 'GB' was not declared in this scope
/users/amirtaheri/openttd/src/string.cpp:269: error: 'GB' was not declared in this scope
/users/amirtaheri/openttd/src/string.cpp: In function 'size_t Utf8TrimString(char*, size_t)':
/users/amirtaheri/openttd/src/string.cpp:293: error: 'Utf8EncodedCharLen' was not declared in this scope
make[2]: *** [string.o] Error 1
make[1]: *** [/users/amirtaheri/openttd/objs/lang/table/strings.h] Error 2
make: *** [all] Error 2
You need to be wary of unescaped exclamation marks. bash loves to parse them as history events with absolutely the highest precedence, which is annoying.DaleStan wrote:Try these two:
"svn st | grep !"
<snip>
http://wiki.openttd.org/index.php/Compiling_on_Macblackjak231 wrote:hi guys!
i recently bought a macbook and i really wanted OpenTTD, so i installed it, added new grfs, and then i want to install a patch.... I never understood how people do it a windows, so on a Mac.... i have no idea!!! im guessing i should enter this in "terminal", but its not a very clear tutorial to me.
Sorry if i make some of you mad if im the 10000000th person to ask this!
blackjak231 wrote:nope, still cant apply any.... oh well
How else could we possible help you?Yexo wrote:That page might anwers your questions, if not, ask again with the steps you didn't understand and/or the errors you got.
Well, let me explain what im having a problem to understand...Yexo wrote:blackjak231 wrote:nope, still cant apply any.... oh wellHow else could we possible help you?Yexo wrote:That page might anwers your questions, if not, ask again with the steps you didn't understand and/or the errors you got.
Code: Select all
patch -p0 -i file.diff
Code: Select all
patch -p2 -i trafficlights.diff