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

[meson|scripts] update scripts #12945

Merged
merged 12 commits into from Nov 18, 2020
Merged

Conversation

Neumann-A
Copy link
Contributor

@Neumann-A Neumann-A commented Aug 16, 2020

@PhoebeHui PhoebeHui added the category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly label Aug 19, 2020
@Neumann-A
Copy link
Contributor Author

seems like a merged the wrong branch here once. The expat changes shouldn't be in here.

@Neumann-A
Copy link
Contributor Author

Current error:

Traceback (most recent call last):
  File "E:\vcpkg_cache\downloads\tools\meson\meson-0.56.0\mesonbuild\mesonmain.py", line 140, in run
    return options.run_func(options)
  File "E:\vcpkg_cache\downloads\tools\meson\meson-0.56.0\mesonbuild\msetup.py", line 253, in run
    app.generate()
  File "E:\vcpkg_cache\downloads\tools\meson\meson-0.56.0\mesonbuild\msetup.py", line 161, in generate
    self._generate(env)
  File "E:\vcpkg_cache\downloads\tools\meson\meson-0.56.0\mesonbuild\msetup.py", line 223, in _generate
    intr.backend.generate()
  File "E:\vcpkg_cache\downloads\tools\meson\meson-0.56.0\mesonbuild\backend\ninjabackend.py", line 533, in generate
    self.write_rules(outfile)
  File "E:\vcpkg_cache\downloads\tools\meson\meson-0.56.0\mesonbuild\backend\ninjabackend.py", line 1122, in write_rules
    b.count_rule_references()
  File "E:\vcpkg_cache\downloads\tools\meson\meson-0.56.0\mesonbuild\backend\ninjabackend.py", line 342, in count_rule_references
    if self._should_use_rspfile():
  File "E:\vcpkg_cache\downloads\tools\meson\meson-0.56.0\mesonbuild\backend\ninjabackend.py", line 336, in _should_use_rspfile
    return self.rule.length_estimate(infilenames,
  File "E:\vcpkg_cache\downloads\tools\meson\meson-0.56.0\mesonbuild\backend\ninjabackend.py", line 273, in length_estimate
    if chunk[1] == '{':
IndexError: string index out of range

waiting for upstream comment

@Neumann-A
Copy link
Contributor Author

something is strange here:
without the changes the following compiles:
[1/5] cc -Imunit_example.p -I. -I../src/3a51af77fd-8670ab3989.clean -Xclang -fcolor-diagnostics -pipe -Wall -Winvalid-pch -std=c99 -fPIC -MD -MQ munit_example.p/example.c.o -MF munit_example.p/example.c.o.d -o munit_example.p/example.c.o -c ../src/3a51af77fd-8670ab3989.clean/example.c
with these changes there is an error:

[1/5] /Library/Developer/CommandLineTools/usr/bin/cc -Imunit_example.p -I. -I../src/3a51af77fd-8670ab3989.clean -I/Users/vagrant/Data/installed/x64-osx/include -Xclang -fcolor-diagnostics -pipe -Wall -Winvalid-pch -std=c99 -fPIC -O3 -DNDEBUG -MD -MQ munit_example.p/example.c.o -MF munit_example.p/example.c.o.d -o munit_example.p/example.c.o -c ../src/3a51af77fd-8670ab3989.clean/example.c
FAILED: munit_example.p/example.c.o 
/Library/Developer/CommandLineTools/usr/bin/cc -Imunit_example.p -I. -I../src/3a51af77fd-8670ab3989.clean -I/Users/vagrant/Data/installed/x64-osx/include -Xclang -fcolor-diagnostics -pipe -Wall -Winvalid-pch -std=c99 -fPIC -O3 -DNDEBUG -MD -MQ munit_example.p/example.c.o -MF munit_example.p/example.c.o.d -o munit_example.p/example.c.o -c ../src/3a51af77fd-8670ab3989.clean/example.c
In file included from ../src/3a51af77fd-8670ab3989.clean/example.c:11:
../src/3a51af77fd-8670ab3989.clean/munit.h:29:10: fatal error: 'stdlib.h' file not found
#include <stdlib.h>
         ^~~~~~~~~~
1 error generated.

for me the cmd line looks virtually the same except that instead of only cc the full path to /Library/Developer/CommandLineTools/usr/bin/cc is used (and the extra compiler flags and includes). Can somebody with access to a OSX debug this? I don't understand what is happening here and the osx failure is the only thing blocking this PR. @JackBoosY @strega-nil @BillyONeal

@JackBoosY
Copy link
Contributor

@Neumann-A Trying...

@JackBoosY
Copy link
Contributor

Same error on osx machine by manually run that command:

vcpkg@vcpkg x64-osx-rel %  /Library/Developer/CommandLineTools/usr/bin/cc -Imunit_example.p -I. -I../src/3a51af77fd-8670ab3989.clean -I/Users/vcpkg/Documents/vcpkg/12945/vcpkg/installed/x64-osx/include -Xclang -fcolor-diagnostics -pipe -Wall -Winvalid-pch -std=c99 -fPIC -O3 -DNDEBUG -MD -MQ munit_example.p/example.c.o -MF munit_example.p/example.c.o.d -o munit_example.p/example.c.o -c ../src/3a51af77fd-8670ab3989.clean/example.c
In file included from ../src/3a51af77fd-8670ab3989.clean/example.c:11:
../src/3a51af77fd-8670ab3989.clean/munit.h:29:10: fatal error: 'stdlib.h' file not found
#include <stdlib.h>
         ^~~~~~~~~~
1 error generated.

@strega-nil Can you please take a look?

@Neumann-A Neumann-A marked this pull request as ready for review November 18, 2020 17:56
- rename internal functions to be prefixed with _vcpkg_
- fix VCPKG_CHAINLOAD_TOOLCHAIN_FILE for ios/freebsd
Copy link
Contributor

@strega-nil strega-nil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to see these changes made then I'll merge, thanks @Neumann-A :)

scripts/cmake/vcpkg_configure_meson.cmake Outdated Show resolved Hide resolved
scripts/cmake/vcpkg_configure_meson.cmake Outdated Show resolved Hide resolved
scripts/cmake/vcpkg_configure_meson.cmake Outdated Show resolved Hide resolved
message(FATAL_ERROR "Unsupported host architecture ${BUILD_ARCH}!" )
endif()
else() # TODO: add correct detection for OSX and Linux. Currently only x64 triplets are available in official vcpkg.
set(BUILD_CPU_FAM x86_x64)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to self: I have to fix this soon yay

@strega-nil
Copy link
Contributor

Thanks so much @Neumann-A ! You've put a ton of work into making this a better experience and we really appreciate it 😄

@Neumann-A Neumann-A deleted the make_meson_sane branch November 18, 2020 21:37
@c72578
Copy link
Contributor

c72578 commented Nov 19, 2020

Just for the records:
The meson version used in vcpkg is now at this commit of the master branch:
mesonbuild/meson@91876b4

@Neumann-A
Copy link
Contributor Author

@c72578 yeah I had to restore to using some fixed commit of meson/master since meson seems to be horribly unstable and I did not want to wait for 0.61 for this to be merged .... I also considered to somehow add patches to vcpkg_find_acquire_program to patch the mess meson sometimes is.....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants