rgaufman / live555

A mirror of the live555 source code.
GNU Lesser General Public License v3.0
768 stars 370 forks source link

openrtsp 2023.06.16 build issue #45

Open chenrui333 opened 1 year ago

chenrui333 commented 1 year ago

👋 trying to build the latest release, but run into some build issue. The error log is as below:

error build log ``` BasicTaskScheduler.cpp: In member function ‘virtual void BasicTaskScheduler::SingleStep(unsigned int)’: BasicTaskScheduler.cpp:200:42: error: ‘struct std::atomic_flag’ has no member named ‘test’ 200 | if (fTriggersAwaitingHandling[i].test()) { | ^~~~ make[1]: *** [Makefile:41: BasicTaskScheduler.o] Error 1 ```

full build log, https://github.com/Homebrew/homebrew-core/actions/runs/5287551081/jobs/9568349761 relates to Homebrew/homebrew-core#133924

pepeRossRobotics commented 1 year ago

Same issue here

jahwanoh commented 1 year ago

Same issue

pepeRossRobotics commented 1 year ago

A project that I follow fixed it in her https://github.com/mpromonet/v4l2rtspserver/commit/1ee9496effa2357a4a3767038d6a1fd99920c1dc

kang-hyuck commented 1 year ago

The current repository source is the 06.14 version, but I downloaded the 06.20 version source from the live555 official website and confirmed the same build error.

If you are 06.20 version, the problem is:

test variable in atomic_flag is a feature supported by c++20. If your compiler fully supports c++20, you can just use the -std=c++20 or -std=c++2a option to solve the problem. However, this may not work if your compiler does not fully support c++20.

If that's the case, just build by adding the _-DNO_STDLIB option. I solved the problem this way.

luo980 commented 1 year ago

The current repository source is the 06.14 version, but I downloaded the 06.20 version source from the live555 official website and confirmed the same build error.

If you are 06.20 version, the problem is:

test variable in atomic_flag is a feature supported by c++20. If your compiler fully supports c++20, you can just use the -std=c++20 or -std=c++2a option to solve the problem. However, this may not work if your compiler does not fully support c++20.

If that's the case, just build by adding the _-DNO_STDLIB option. I solved the problem this way.

* _NO_STD_LIB_ macro was added in **06.16 version** and more details can be found here:
  http://www.live555.com/liveMedia/public/changelog.txt

This works, just edit the config.platform file to add -std=c++2a to CPLUSCPLUS_FLAGS solves problem.

august295 commented 1 year ago

The current repository source is the 06.14 version, but I downloaded the 06.20 version source from the live555 official website and confirmed the same build error.

If you are 06.20 version, the problem is:

test variable in atomic_flag is a feature supported by c++20. If your compiler fully supports c++20, you can just use the -std=c++20 or -std=c++2a option to solve the problem. However, this may not work if your compiler does not fully support c++20.

If that's the case, just build by adding the _-DNO_STDLIB option. I solved the problem this way.

thank you, my env is Ubuntu20.04 and live.2023.07.24.tar.gz, so i edit the config.linux-64bit, Added -DNO_STD_LIB at the end of the first line, Modify to COMPILE_OPTS = $(INCLUDES) -m64 -fPIC -I/usr/local/include -I. -O2 -DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DNO_STD_LIB

yucai233 commented 1 year ago

which config file belong to raspberry 3b+?

barracuda156 commented 8 months ago

Yes, passing -std=c++20 fixes this issue.