Giter VIP home page Giter VIP logo

Comments (11)

waruqi avatar waruqi commented on June 18, 2024 2

@Arthapz Any idea? https://github.com/xmake-io/xmake/actions/runs/8858190130/job/24326535957

from xmake.

Arthapz avatar Arthapz commented on June 18, 2024

@Arthapz Any idea? https://github.com/xmake-io/xmake/actions/runs/8858190130/job/24326535957

on it, but i need to build a GCC 14 because archlinux haven't rolled out GCC 14

from xmake.

c8ef avatar c8ef commented on June 18, 2024

@Arthapz Any idea? https://github.com/xmake-io/xmake/actions/runs/8858190130/job/24326535957

on it, but i need to build a GCC 14 because archlinux haven't rolled out GCC 14

Using fedora rawhide docker image will suffice😋

from xmake.

waruqi avatar waruqi commented on June 18, 2024

@Arthapz Any idea? https://github.com/xmake-io/xmake/actions/runs/8858190130/job/24326535957

on it, but i need to build a GCC 14 because archlinux haven't rolled out GCC 14

try this docker image, https://github.com/waruqi/dockerfiles/blob/master/fedora/Dockerfile

from xmake.

Arthapz avatar Arthapz commented on June 18, 2024

@Arthapz Any idea? https://github.com/xmake-io/xmake/actions/runs/8858190130/job/24326535957

on it, but i need to build a GCC 14 because archlinux haven't rolled out GCC 14

Using fedora rawhide docker image will suffice😋

I need to try other things with GCC master branch (gcc std module) so I need compile it (well it's done, AUR packages make it easy) D

from xmake.

Arthapz avatar Arthapz commented on June 18, 2024

mmmmh, incremental build for gcc is also broken on fallback dependency scanner
image

from xmake.

Arthapz avatar Arthapz commented on June 18, 2024

mmmh seems like something is invalidating dependinfo of cppfiles

if dryrun or depend.is_changed(dependinfo, {lastmtime = lastmtime, values = depvalues}) then

and seems like it's the mtime

xmake  b -vD
[check_build_deps]: file /tmp/.xmake1000/240428/hello/src/main.cpp is changed, mtime: 1714329688, lastmtime: 1714329682
[check_build_deps]: file src/main.cpp is changed, mtime: 1712014483, lastmtime: 0
[ 71%]: compiling.release src/main.cpp
/usr/bin/gcc -c -m64 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -std=c++20 -fmodules-ts -D_GLIBCXX_USE_CXX11_ABI=0 -DNDEBUG -fmodule-mapper=/tmp/.xmake1000/240428/hello/src/main.cpp -o build/.ob
js/hello/linux/x86_64/release/src/main.cpp.o src/main.cpp
[check_build_deps]: file build/.objs/hello/linux/x86_64/release/src/main.cpp.o is changed, mtime: 1714329688, lastmtime: 1714329682
[ 85%]: linking.release hello
/usr/bin/g++ -o build/linux/x86_64/release/hello build/.objs/hello/linux/x86_64/release/src/main.cpp.o build/.objs/hello/linux/x86_64/release/src/hello.mpp.o -m64 -s

build cache stats:
cache directory: build/.build_cache
cache hit rate: 0%
cache hit: 0
cache hit total time: 0,000s
cache miss: 0
cache miss total time: 0,000s
new cached files: 0
remote cache hit: 0
remote new cached files: 0
preprocess failed: 0
compile fallback count: 0
compile total time: 0,000s

[100%]: build ok, spent 0,068s

from xmake.

Arthapz avatar Arthapz commented on June 18, 2024
function is_changed(dependinfo, opt)
    print(dependinfo.files)
> xmake b
{ 
  "src/main.cpp",
  "/tmp/.xmake1000/240428/hello/src/main.cpp",
  "src/main.cpp" 
}
[100%]: build ok, spent 0,011s
> xmake b
{ 
  "src/main.cpp",
  "src/main.cpp",
  "/tmp/.xmake1000/240428/hello/src/main.cpp" 
}
[ 71%]: compiling.release src/main.cpp
[ 85%]: linking.release hello
[100%]: build ok, spent 0,057s
> xmake b
{ 
  "src/main.cpp",
  "/tmp/.xmake1000/240428/hello/src/main.cpp",
  "src/main.cpp" 
}

[ 71%]: compiling.release src/main.cpp
[ 85%]: linking.release hello
[100%]: build ok, spent 0,061s
> xmake b
{ 
  "src/main.cpp",
  "/tmp/.xmake1000/240428/hello/src/main.cpp",
  "src/main.cpp" 
}
[100%]: build ok, spent 0,013s

@waruqi any idea how we can have always the same order for dependfiles ? it's seems this is the root cause here
rebuild is trigger because dependinfo.file is not always in the same order

/tmp/.xmake1000/240428/hello/src/main.cpp is the mapper file added with fileconfig_add

from xmake.

waruqi avatar waruqi commented on June 18, 2024

This is not the root cause, it doesn't depend on the order of the files, just that the mtime of the files has been changed.

The root cause is that gcc14 generates some different dependency information.

build/.deps/hello/linux/x86_64/release/src/main.cpp.o.d in gcc-13

 build/.objs/hello/linux/x86_64/release/src/main.cpp.o: src/main.cpp
build/.objs/hello/linux/x86_64/release/src/main.cpp.o: hello.c++m
CXX_IMPORTS += hello.c++m

build/.deps/hello/linux/x86_64/release/src/main.cpp.o.d in gcc-14

 build/.objs/hello/linux/x86_64/release/src/main.cpp.o: src/main.cpp  /tmp/.xmake995/240429/hello/src/main.cpp  build/.gens/hello/linux/x86_64/release/rules/bmi/cache/modules/c83caa2b/hello.gcm
build/.objs/hello/linux/x86_64/release/src/main.cpp.o: hello.c++m
CXX_IMPORTS += hello.c++m

so /tmp/.xmake995/240429/hello/src/main.cpp will be inserted dependinfo.files

table.join2(dependinfo.files, depfiles)

but this file is always changed when doing incremental build.

module_mapper = _generate_modulemapper_file(target, opt.module, opt.cppfile)

About files order issues.

Because result is a hashset. it returned a unstable-order dep files array. But we need not fix it.

return results:to_array()

from xmake.

waruqi avatar waruqi commented on June 18, 2024

Therefore, we should avoid re-generating the mapping file each time.

from xmake.

waruqi avatar waruqi commented on June 18, 2024

see #5030

from xmake.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.