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 install && --prefix issue #657

Closed
ktrzeciaknubisa opened this issue Nov 22, 2015 · 6 comments
Closed

make install && --prefix issue #657

ktrzeciaknubisa opened this issue Nov 22, 2015 · 6 comments

Comments

@ktrzeciaknubisa
Copy link
Member

There is a problem I'm having with --prefix value passed to configure script. For example after I use ./configure --prefix=some_folder then make install puts the binaries into the root: /some_folder instead of current working directory ./some_folder.

That makes e.g. ios_compile.sh script failing for me. Take a look at this:

  1. ./build_scripts/ios_compile.sh

  2. the it calls e.g. ./configure --prefix=out_ios/ia32 --static-library --dest-os=ios --dest-cpu=ia32 --engine-mozilla and it displays proper node_prefix:

    'variables': { 
        ...
        'node_prefix': 'out_ios/ia32',
        ...
    }
  3. but make install saves them to root / instead of ./:

    installing /out_ios/ia32/bin/libcares.a
  4. and then the rest of ios_compile.sh script fails, e.g.:

    mv: rename out_ios/ia32/bin/libcares.a to out_ios/ia32/bin/libcares_ia32.a: No such file or directory
  5. yeap, beacause there is no out_ios/ia32/bin. There is /out_ios/ia32/bin (note the root slash in front)

I've found a simple solution: change Makefile#L6 from DESTDIR ?= to DESTDIR ?= ./. This is used at tools/install.py#L187-L189 (as argv[2]) which was empty string until now.


I just wonder of two things:

  • in the past ios_compile.sh used to fork for me, and DESTDIR was not changed.
  • how are you guys handling this. Is ios_compile.sh still working for you?
@obastemur
Copy link
Member

@ktrzeciaknubisa just tested. It still works for me on 0.3.1.0

@ktrzeciaknubisa
Copy link
Member Author

and what is output of make install ? does it use / or ./ ?

installing /out_ios/ia32/bin/libcares.a

I'm thinking, that there might be a case when it works if e.g. you have some old jxcore/out_ios/ia32/bin/ . In that case script would find them and would not fail.

@obastemur
Copy link
Member

Right. Just saw the broken output. Better apply the fix. Perhaps the updates I brought from node 0.12 broke it.

ktrzeciaknubisa pushed a commit that referenced this issue Nov 22, 2015
use ./ rather than / for DESTDIR. Closes #657
@ktrzeciaknubisa
Copy link
Member Author

Done. Do we need to refresh jxcore-cordova due to this folders confusion?

@jasonkarns
Copy link
Collaborator

late comment, but gnu configure expects --prefix to be an absolute dir. It defaults to /usr/local, IIRC

@jasonkarns
Copy link
Collaborator

If a relative directory is desired, ./configure --prefix=some_dir it should be invoked as ./configure --prefix=$PWD/some_dir.

From gcc mailing list: https://gcc.gnu.org/ml/gcc/2006-05/msg00646.html

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

3 participants