Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make Error #3

Closed
odunboye opened this issue Jul 13, 2017 · 10 comments
Closed

make Error #3

odunboye opened this issue Jul 13, 2017 · 10 comments

Comments

@odunboye
Copy link

typing make after cloning gives the following error

/bin/sh: ofiles/git_version_info.h: No such file or directory
make: *** [get_version] Error 1

mac osx sierra
kindly help.

@mubes
Copy link
Collaborator

mubes commented Aug 12, 2017

Sorry, didn't see this :-(

So, the problem is that a git version stamp is generated automatically by the makefile. If you do not have git installed and running then that will cause you issues. You can put a file into ofiles/git_version_info.h containing something like the following (and remove the git_hash_to_c.sh reference in the makefile).

#define GIT_DIRTY         1
#define GIT_HASH          0x3bae84eb
#define GIT_BRANCH        "master"
#define BUILD_DATE        "2017-07-28 23:03:00+0100"

Frankly, the preferred option is to pull the build across as a git tree and build that, and then the problem should go away, and you stay current with the git changes too.

Regards

DAVE

@karlp
Copy link
Contributor

karlp commented Aug 29, 2017

nope. it's not quite that. you get that error even in a git clone.

karlp@teros:~/src/orbuculum (master)$ make
/bin/sh: ofiles/git_version_info.h: No such file or directory
Makefile:157: recipe for target 'get_version' failed
make: *** [get_version] Error 1
karlp@teros:~/src/orbuculum (master)$ git log --oneline -n 1
50e669c Changes to orbtrace to use memory elements
karlp@teros:~/src/orbuculum (master)$

@karlp
Copy link
Contributor

karlp commented Aug 29, 2017

(I think you just need a mkdir -p call)

diff --git a/Makefile b/Makefile
index bc56fa6..1e742c2 100644
--- a/Makefile
+++ b/Makefile
@@ -154,6 +154,7 @@ CFILES += $(App_DIR)/itmDecoder.c $(App_DIR)/tpiuDecoder.c $(App_DIR)/generics.c
 all : build 
 
 get_version:
+       $(Q)mkdir -p $(OLOC)
        $(Q)$(GET_GIT_HASH) > $(OLOC)/$(GIT_HASH_FILENAME)
 
 $(OLOC)/%.o : %.c

karlp added a commit to karlp/orbuculum that referenced this issue Sep 12, 2017
@mubes
Copy link
Collaborator

mubes commented Oct 6, 2017

Agreed. Thanks for the fix.

@odunboye
Copy link
Author

odunboye commented Jan 6, 2018

After running make

ld: library not found for -liberty
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [orbuculum] Error 1

Mac OS X high Sierra

Kindly help

@mubes
Copy link
Collaborator

mubes commented Jan 6, 2018 via email

@odunboye
Copy link
Author

odunboye commented Jan 6, 2018

Hello Dave,

Thanks for this nice software.
I removed the '-Liberty' and ran make again then got below

Completed build of orbuculum
Completed build of orbcat
Compiling Src/orbtop.c
Src/orbtop.c:327:94: warning: format specifies type 'long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat]
fprintf( stdout, "%3d.%02d%% %8ld ", percentage / 100, percentage % 100, report[n].count );
~~~~ ^~~~~~~~~~~~~~~
%8llu
Src/orbtop.c:367:93: warning: format specifies type 'long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat]
fprintf( stdout, "%3d.%02d%% %8ld Samples" EOL, totPercent / 100, totPercent % 100, samples );
~~~~ ^~~~~~~
%8llu
Src/orbtop.c:371:100: warning: format specifies type 'long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat]
fprintf( stdout, "%3d.%02d%% %8ld of %ld Samples" EOL, totPercent / 100, totPercent % 100, dispSamples, samples );
~~~~ ^~~~~~~~~~~
%8llu
Src/orbtop.c:371:113: warning: format specifies type 'long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat]
fprintf( stdout, "%3d.%02d%% %8ld of %ld Samples" EOL, totPercent / 100, totPercent % 100, dispSamples, samples );
~~~ ^~~~~~~
%llu
4 warnings generated.
Compiling Src/symbols.c
Src/symbols.c:204:26: error: no member named 'st_mtim' in 'struct stat'
( memcmp( &n.st_mtim, &( ( *s )->st.st_mtim ), sizeof( struct timespec ) ) ) ||
~ ^
Src/symbols.c:204:49: error: no member named 'st_mtim' in 'struct stat'
( memcmp( &n.st_mtim, &( ( *s )->st.st_mtim ), sizeof( struct timespec ) ) ) ||
~~~~~~~~~~ ^
Src/symbols.c:205:26: error: no member named 'st_ctim' in 'struct stat'
( memcmp( &n.st_ctim, &( ( *s )->st.st_ctim ), sizeof( struct timespec ) ) )
~ ^
Src/symbols.c:205:49: error: no member named 'st_ctim' in 'struct stat'
( memcmp( &n.st_ctim, &( ( *s )->st.st_ctim ), sizeof( struct timespec ) ) )
~~~~~~~~~~ ^
4 errors generated.
make: *** [ofiles/Src/symbols.o] Error 1

What could be the problem?
Mac OS X high Sierra

@mubes
Copy link
Collaborator

mubes commented Jan 6, 2018 via email

@pvonmoradi
Copy link

After running make

ld: library not found for -liberty clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [orbuculum] Error 1

Mac OS X high Sierra

Kindly help

In Xubuntu 18.04 I installed these to build the app:
sudo apt install binutils-dev libelf-dev libiberty-dev
(note the last one for -liberty)

@karlp
Copy link
Contributor

karlp commented Dec 17, 2020

please make a new issue, your issue is completely unrelated to this make directory path error from two years ago

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants