Skip to content

Conversation

jabbas
Copy link
Contributor

@jabbas jabbas commented Sep 9, 2025

Removal od JAVA_HOME - ubuntu itself (using update-alternatives) is setting that variable.

Change from libc++1-11 into libc++1 - the -11 version forces to use specific version of C++ flavor, without that it takes the version that is currently installed in the system.

I've tested this image by using it to build one of our applications - all went well.

@cortinico cortinico merged commit 6c7d54f into react-native-community:main Sep 9, 2025
2 checks passed
@jabbas jabbas deleted the distro-agnostic branch September 9, 2025 09:49
@jabbas
Copy link
Contributor Author

jabbas commented Sep 9, 2025

qq: probably to @cortinico what should be done to make an new docker hub release?

@cortinico
Copy link
Member

Change from libc++1-11 into libc++1 - the -11 version forces to use specific version of C++ flavor, without that it takes the version that is currently installed in the system.

Hey @jabbas
Your changes broke the run_fantom_test on facebook/react-native which we use to run C++ tests:
https://github.com/facebook/react-native/actions/runs/17642257103/job/50131840156

The failure is:

clang++: warning: -lpthread: 'linker' input unused [-Wunused-command-line-argument]
clang++: warning: -lpthread: 'linker' input unused [-Wunused-command-line-argument]
clang++: warning: -lpthread: 'linker' input unused [-Wunused-command-line-argument]
/__w/react-native/react-native/private/react-native-fantom/build/third-party/folly/folly/lang/Exception.cpp:107:8: error: 'unexpected_handler' is deprecated [-Werror,-Wdeprecated-declarations]
  107 |   std::unexpected_handler unexpectedHandler;
      |        ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/exception:82:18: note: 'unexpected_handler' has been explicitly marked deprecated here
   82 |   typedef void (*_GLIBCXX11_DEPRECATED unexpected_handler) ();
      |                  ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/x86_64-linux-gnu/c++/13/bits/c++config.h:105:32: note: expanded from macro '_GLIBCXX11_DEPRECATED'
  105 | # define _GLIBCXX11_DEPRECATED _GLIBCXX_DEPRECATED
      |                                ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/x86_64-linux-gnu/c++/13/bits/c++config.h:96:46: note: expanded from macro '_GLIBCXX_DEPRECATED'
   96 | # define _GLIBCXX_DEPRECATED __attribute__ ((__deprecated__))
      |                                              ^
1 error generated.
gmake[3]: *** [folly/CMakeFiles/folly_runtime.dir/build.make:359: folly/CMakeFiles/folly_runtime.dir/folly/lang/Exception.cpp.o] Error 1
gmake[3]: *** Waiting for unfinished jobs....
gmake[2]: *** [CMakeFiles/Makefile2:1923: folly/CMakeFiles/folly_runtime.dir/all] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:1824: CMakeFiles/fantom_tester.dir/rule] Error 2
gmake: *** [Makefile:125: fantom_tester] Error 2

Could you please look into it? Otherwise I would have to revert it to use libc++1-11 to unblock main

@jabbas
Copy link
Contributor Author

jabbas commented Sep 11, 2025

Revert it for now. I'll take a look.

facebook-github-bot pushed a commit to facebook/react-native that referenced this pull request Sep 11, 2025
…53732)

Summary:
This temporarly unblocks `run_fantom_tests` till we find a solution for the docker image bump. See:
- react-native-community/docker-android#242 (comment)

## Changelog:

[INTERNAL] -

Pull Request resolved: #53732

Test Plan: CI

Reviewed By: cipolleschi

Differential Revision: D82212022

Pulled By: cortinico

fbshipit-source-id: 652926addf12cc2d88ac2139d3ec58a266ced9ef
@jabbas
Copy link
Contributor Author

jabbas commented Sep 11, 2025

@cortinico Tne C++ standard in ubuntu 24.04 is C++18 i think that code of react native or tests needs to be tweaked.

https://stackoverflow.com/questions/74052020/best-practice-for-deprecating-c-code-with-warnings-as-errors

@jabbas
Copy link
Contributor Author

jabbas commented Sep 11, 2025

On second look - we can install gcc-11 instead of default gcc-13, i don't think we need libc++1-11 or libc++1-18 package. The gcc-11 contains all what is needed to build c++ code. the libc++1-11/-18 is part of llvm which is an alternative c++ compiler which we don't use.

@jabbas
Copy link
Contributor Author

jabbas commented Sep 11, 2025

@cortinico please check #244

@cortinico
Copy link
Member

@cortinico please check #244

Thanks for the quick follow up 🙏

vzaidman pushed a commit to facebook/react-native that referenced this pull request Sep 16, 2025
…53732)

Summary:
This temporarly unblocks `run_fantom_tests` till we find a solution for the docker image bump. See:
- react-native-community/docker-android#242 (comment)

## Changelog:

[INTERNAL] -

Pull Request resolved: #53732

Test Plan: CI

Reviewed By: cipolleschi

Differential Revision: D82212022

Pulled By: cortinico

fbshipit-source-id: 652926addf12cc2d88ac2139d3ec58a266ced9ef
cortinico added a commit that referenced this pull request Sep 16, 2025
@cortinico
Copy link
Member

Hey @jabbas I sadly had to revert this on main and publish https://github.com/react-native-community/docker-android/releases/tag/v20.0 without those changes.

Sadly #244 didn't fix the problem we had with fantom on facebook/react-native@main.

I now added a new test on this repository that attempts to build fantom and mimics the same CI job we have on facebook/react-native@main that needs to pass before we merge further changes 👍 That should help us iterate without publishing new images

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

Successfully merging this pull request may close these issues.

2 participants