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

Wrong .o location when building on Solaris 11 with gcc 4.8.2 #3

Closed
ghost opened this issue Dec 21, 2015 · 3 comments
Closed

Wrong .o location when building on Solaris 11 with gcc 4.8.2 #3

ghost opened this issue Dec 21, 2015 · 3 comments

Comments

@ghost
Copy link

ghost commented Dec 21, 2015

Wren make runs in dlib directiry error occures:

gcc -g -O2 -Wall -W -I/users/iav/eMail/dlib -I/users/iav/eMail/dlib/src -I/users/iav/eMail/dlib/include -I../include  -DHAVE_CONFIG_H  -c  src/dnet.c
In file included from src/dnet.c:14:0:
/users/iav/eMail/dlib/include/config.h:183:0: warning: "_FILE_OFFSET_BITS" redefined [enabled by default]
 #define _FILE_OFFSET_BITS 64
 ^
In file included from /usr/include/stdio.h:15:0,
                 from src/dnet.c:1:
/usr/include/sys/feature_tests.h:204:0: note: this is the location of the previous definition
 #define _FILE_OFFSET_BITS 32
 ^
gcc -g -O2 -Wall -W -I/users/iav/eMail/dlib -I/users/iav/eMail/dlib/src -I/users/iav/eMail/dlib/include -I../include  -DHAVE_CONFIG_H  -c  src/dhash.c
gcc -g -O2 -Wall -W -I/users/iav/eMail/dlib -I/users/iav/eMail/dlib/src -I/users/iav/eMail/dlib/include -I../include  -DHAVE_CONFIG_H  -c  src/dlist.c
gcc -g -O2 -Wall -W -I/users/iav/eMail/dlib -I/users/iav/eMail/dlib/src -I/users/iav/eMail/dlib/include -I../include  -DHAVE_CONFIG_H  -c  src/dstrbuf.c
gcc -g -O2 -Wall -W -I/users/iav/eMail/dlib -I/users/iav/eMail/dlib/src -I/users/iav/eMail/dlib/include -I../include  -DHAVE_CONFIG_H  -c  src/dutil.c
gcc -g -O2 -Wall -W -I/users/iav/eMail/dlib -I/users/iav/eMail/dlib/src -I/users/iav/eMail/dlib/include -I../include  -DHAVE_CONFIG_H  -c  src/dvector.c

ar rc libdlib.a src/dnet.o src/dhash.o src/dlist.o src/dstrbuf.o src/dutil.o src/dvector.o

ar: cannot open src/dnet.o: No such file or directory
ar: cannot open src/dhash.o: No such file or directory
ar: cannot open src/dlist.o: No such file or directory
ar: cannot open src/dstrbuf.o: No such file or directory
ar: cannot open src/dutil.o: No such file or directory
ar: cannot open src/dvector.o: No such file or directory
ar: src/dnet.o not found
ar: src/dhash.o not found
ar: src/dlist.o not found
ar: src/dstrbuf.o not found
ar: src/dutil.o not found
ar: src/dvector.o not found
**\* Error code 6```
seems it looks for *.o files in src/ directory, but really they lies in current (dlib/) directory.
ar should look for that files in dlib/, or .o files should be placed in dlib/src/.
@deanproxy
Copy link
Owner

Where are you trying to build dlib from? This doesn't appear to be an issue on any other system. You should make sure you're building it inside of the dlib directory, not outside of it.

@ghost
Copy link
Author

ghost commented Dec 23, 2015

I try to build staying inside root of dlib dir, where makefile placed.
Same result when dlip make runs from email directory by email make.
GCC taken from default solaris repository.

@ghost
Copy link
Author

ghost commented Dec 28, 2015

Now it works:

diff --git a/Makefile.in b/Makefile.in
index 09556c9..6519c44 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -23,6 +23,9 @@ FILES = src/dnet.o src/dhash.o src/dlist.o src/dstrbuf.o src/dutil.o src/dvector

 .PHONY: all clean-all clean distclean install uninstall

+.c.o:
+       $(CC) $(CFLAGS) -c $*.c -o $*.o
+
 all: $(FILES)
        ar rc libdlib.a $(FILES)

@deanproxy can it be included upstream?

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

No branches or pull requests

1 participant